UserAgentUtil Class

  • java.lang.Object
    • com.azure.core.util.UserAgentUtil

public final class UserAgentUtil

Utility for building user agent string for Azure client libraries as specified in the design guidelines.

Field Summary

Modifier and Type Field and Description
static final String DEFAULT_USER_AGENT_HEADER

Default UserAgent header.

Method Summary

Modifier and Type Method and Description
static String toUserAgentString(String applicationId, String sdkName, String sdkVersion, Configuration configuration)

Return user agent string for the given sdk name and version.

Methods inherited from java.lang.Object

Field Details

DEFAULT_USER_AGENT_HEADER

public static final String DEFAULT_USER_AGENT_HEADER

Default UserAgent header.

Method Details

toUserAgentString

public static String toUserAgentString(String applicationId, String sdkName, String sdkVersion, Configuration configuration)

Return user agent string for the given sdk name and version.

Parameters:

applicationId - Name of the application.
sdkName - Name of the SDK.
sdkVersion - Version of the SDK.
configuration - The configuration to use to determine if platform info should be included in the user agent string.

Returns:

User agent string as specified in design guidelines.

Applies to

Azure SDK for Java

Latest