All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.security.xsuaa.util.HttpClientUtil Maven / Gradle / Ivy

There is a newer version: 3.5.6
Show newest version
/**
 * SPDX-FileCopyrightText: 2018-2023 SAP SE or an SAP affiliate company and Cloud Security Client Java contributors
 * 

* SPDX-License-Identifier: Apache-2.0 */ package com.sap.cloud.security.xsuaa.util; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class HttpClientUtil { private HttpClientUtil() { // use static fields and methods } public static String getUserAgent() { Properties props = new Properties(); InputStream stream = HttpClientUtil.class.getResourceAsStream("/token-client.properties"); try { props.load(stream); return props.getProperty("artifactId") + "/" + props.getProperty("version"); } catch (IOException | NullPointerException | IllegalArgumentException e) { return "token-client/0.0.0"; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy