public class UserAgentPolicy extends Object implements HttpPipelinePolicy
| Constructor and Description |
|---|
UserAgentPolicy()
Creates a
UserAgentPolicy with a default user agent string. |
UserAgentPolicy(String userAgent)
Creates a UserAgentPolicy with
userAgent as the header value. |
UserAgentPolicy(String sdkName,
String sdkVersion,
Configuration configuration)
Creates a UserAgentPolicy with the
sdkName and sdkVersion in the User-Agent header value. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<HttpResponse> |
process(HttpPipelineCallContext context,
HttpPipelineNextPolicy next)
Process provided request context and invokes the next policy.
|
public UserAgentPolicy()
UserAgentPolicy with a default user agent string.public UserAgentPolicy(String userAgent)
userAgent as the header value. If userAgent is null, then
the default user agent value is used.userAgent - The user agent string to add to request headers.public UserAgentPolicy(String sdkName, String sdkVersion, Configuration configuration)
sdkName and sdkVersion in the User-Agent header value.
If the passed configuration contains true for AZURE_TELEMETRY_DISABLED the platform information won't be included
in the user agent.sdkName - Name of the client library.sdkVersion - Version of the client library.configuration - Configuration store that will be checked for the AZURE_TELEMETRY_DISABLED.public reactor.core.publisher.Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
HttpPipelinePolicyprocess in interface HttpPipelinePolicycontext - request contextnext - the next policy to invokeCopyright © 2019 Microsoft Corporation. All rights reserved.