export interface HttpRequestErrorOptions extends ErrorOptions { response?: Response; url?: string; requestUrl?: string; statusCode?: number; statusText?: string; responseBody?: string; } /** * The error that is thrown to indicate a failed HTTP request, usually indicated by status code. */ export declare class HttpRequestError extends Error { name: string; readonly response?: Response; readonly url?: string; readonly requestUrl?: string; readonly statusCode?: number; readonly statusText?: string; readonly responseBody?: string; constructor(message?: string, options?: HttpRequestErrorOptions); static fromResponse(response: Response, options?: HttpRequestErrorOptions): Promise; } /** * Ensures the given HTTP response has a successful status code. * @throws {HttpRequestError} `response.ok` is `false`, i.e., `response.status` is outside the range of 200 ~ 299. * @see {@link Response.ok} */ export declare function ensureResponseOK(response: Response): Promise; //# sourceMappingURL=httpRequestError.d.ts.map