import { CancellationToken } from "../../../base/common/cancellation.js"; import { Disposable } from "../../../base/common/lifecycle.js"; import { IRequestContext, IRequestOptions } from "../../../base/parts/request/common/request.js"; import { ILogService } from "../../log/common/log.service.js"; import { IRequestService } from "./request.service.js"; /** * Use as the {@link IRequestOptions.callSite} value to prevent * request telemetry from being emitted. This is needed for * callers such as the telemetry sender to avoid cyclical calls. */ export declare const NO_FETCH_TELEMETRY = "NO_FETCH_TELEMETRY"; export interface IRequestCompleteEvent { readonly callSite: string; readonly latency: number; readonly statusCode: number | undefined; } export interface AuthInfo { isProxy: boolean; scheme: string; host: string; port: number; realm: string; attempt: number; } export interface Credentials { username: string; password: string; } export declare abstract class AbstractRequestService extends Disposable implements IRequestService { protected readonly logService: ILogService; readonly _serviceBrand: undefined; private counter; private readonly _onDidCompleteRequest; readonly onDidCompleteRequest: import("../../../base/common/event.js").Event; constructor(logService: ILogService); protected logAndRequest(options: IRequestOptions, request: () => Promise): Promise; abstract request(options: IRequestOptions, token: CancellationToken): Promise; abstract resolveProxy(url: string): Promise; abstract lookupAuthorization(authInfo: AuthInfo): Promise; abstract lookupKerberosAuthorization(url: string): Promise; abstract loadCertificates(): Promise; } export declare function isSuccess(context: IRequestContext): boolean; export declare function isClientError(context: IRequestContext): boolean; export declare function isServerError(context: IRequestContext): boolean; export declare function hasNoContent(context: IRequestContext): boolean; export declare function asText(context: IRequestContext): Promise; export declare function asTextOrError(context: IRequestContext): Promise; export declare function asJson(context: IRequestContext): Promise; export declare function updateProxyConfigurationsScope(useHostProxy: boolean, useHostProxyDefault: boolean): void; export declare const USER_LOCAL_AND_REMOTE_SETTINGS: string[]; export declare const systemCertificatesNodeDefault = false;