public final class UserAgentPolicyFactory extends Object implements RequestPolicyFactory
| Constructor and Description |
|---|
UserAgentPolicyFactory()
Creates a
UserAgentPolicyFactory with a default user agent string. |
UserAgentPolicyFactory(String userAgent)
Creates a
UserAgentPolicyFactory with the given user agent string. |
| Modifier and Type | Method and Description |
|---|---|
RequestPolicy |
create(RequestPolicy next,
RequestPolicyOptions options)
Creates RequestPolicy.
|
public UserAgentPolicyFactory(String userAgent)
UserAgentPolicyFactory with the given user agent string.userAgent - The user agent string to add to request headers.public UserAgentPolicyFactory()
UserAgentPolicyFactory with a default user agent string.public RequestPolicy create(RequestPolicy next, RequestPolicyOptions options)
RequestPolicyFactorycreate in interface RequestPolicyFactorynext - the next RequestPolicy in the request-response pipeline.options - The optional arguments that can be passed to a RequestPolicy./**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/