UNPKG

1.14 kBTypeScriptView Raw
1import { HttpOperationResponse } from "../httpOperationResponse";
2import { WebResourceLike } from "../webResource";
3import { getDefaultUserAgentKey } from "./msRestUserAgentPolicy";
4import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
5export declare type TelemetryInfo = {
6 key?: string;
7 value?: string;
8};
9export declare const getDefaultUserAgentHeaderName: typeof getDefaultUserAgentKey;
10export declare function getDefaultUserAgentValue(): string;
11export declare function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory;
12export declare class UserAgentPolicy extends BaseRequestPolicy {
13 readonly _nextPolicy: RequestPolicy;
14 readonly _options: RequestPolicyOptionsLike;
15 protected headerKey: string;
16 protected headerValue: string;
17 constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike, headerKey: string, headerValue: string);
18 sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
19 addUserAgentHeader(request: WebResourceLike): void;
20}
21//# sourceMappingURL=userAgentPolicy.d.ts.map
\No newline at end of file