///
import { RequestOptions } from "https";
import { JsonArray, JsonObject, Primitive } from "type-fest";
export type HttpOptions = RequestOptions & {
maxContentLength?: number;
body?: Record;
};
export type HttpResponse = {
method: string | undefined;
statusCode: number | undefined;
statusMessage: string | undefined;
data: any;
headers: string[];
};
export declare class HttpError extends Error {
constructor(response: HttpResponse, error?: Error);
}
export declare const http: {
delete: (url: string, options?: HttpOptions) => Promise;
get: (url: string, options?: HttpOptions) => Promise;
head: (url: string, options?: HttpOptions) => Promise;
patch: (url: string, options?: HttpOptions) => Promise;
post: (url: string, options?: HttpOptions) => Promise;
put: (url: string, options?: HttpOptions) => Promise;
};
//# sourceMappingURL=http.d.ts.map