Package com.azure.core.util
Class UserAgentUtil
java.lang.Object
com.azure.core.util.UserAgentUtil
Utility for building user agent string for Azure client libraries as specified in the
design guidelines.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
toUserAgentString
(String applicationId, String sdkName, String sdkVersion, Configuration configuration) Return user agent string for the given sdk name and version.
-
Field Details
-
DEFAULT_USER_AGENT_HEADER
DefaultUserAgent
header.- See Also:
-
-
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.
- Throws:
IllegalArgumentException
- IfapplicationId
contains spaces or is larger than 24 characters in length.
-