/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ export type RequestConfig = { /** The authentication resource to be injected into the request as a bearer token */ authResource?: string; /** Require token acquisition that never falls back to interactive authentication. */ authenticationMode?: 'silent'; /** The headers for the request */ headers?: Record; /** AbortSignal forwarded to the underlying `fetch` — e.g. `AbortSignal.timeout(ms)` */ signal?: AbortSignal; /** The type of response for the request. Defaults to json */ responseType?: 'json' | 'text' | 'blob'; /** * The body of the request to send. A plain object is JSON-serialized; a string is sent * verbatim (when Content-Type is not JSON); binary payloads (`Uint8Array`/`Buffer`/`ArrayBuffer`) * are sent as raw bytes unchanged — use these for binary assets so they are not corrupted. */ body?: unknown; /** Prevents default headers from being added to the request */ excludeDefaultHeaders?: boolean; /** Use fetch implementation */ useFetch?: boolean; /** operation name of the telemetry event we want logged */ operationName?: string; /** event data of the telemetry event we want logged */ eventData?: object; /** retryable error handler */ handleRetry?: (originalRequest: Request, response: globalThis.Response) => Promise; }; export type Response = { data: T; status: number; headers: Record; }; export interface IHttpClient { get(url: string, config?: RequestConfig): Promise>; post(url: string, config?: RequestConfig): Promise>; patch(url: string, config?: RequestConfig): Promise>; put(url: string, config?: RequestConfig): Promise>; delete(url: string, config?: RequestConfig): Promise>; } //# sourceMappingURL=IHttpClient.d.ts.map