/******************************************************************************** * Copyright (c) 2019 TypeFox and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ export interface ServerAPIRequest { abortController?: AbortController; abortSignal?: AbortSignal; endpoint: string; method?: 'GET' | 'DELETE' | 'POST' | 'PUT'; headers?: Record; followRedirect?: boolean; credentials?: boolean; payload?: any; } export interface ErrorResponse { error: string; message: string; status: number; path?: string; timestamp?: string; trace?: string; } export declare function sendRequest(req: ServerAPIRequest, retry?: boolean): Promise; /** * Sends a non-retriable HTTP request using the {@link sendRequest} function with retries disabled. * * @template Res - The expected response type. * @param req - The {@link ServerAPIRequest} object containing the request configuration, * including the endpoint, method, headers, payload, and other options. * @returns A promise that resolves to the response of type `Res`. */ export declare function sendNonRetriableRequest(req: ServerAPIRequest): Promise; //# sourceMappingURL=server-request.d.ts.map