/// <reference types="node" />
/// <reference types="node" />
import { RequestError } from 'got';
import { infer as Infer, ZodSchema } from 'zod';
import type { HttpOptions, HttpResponse, InternalHttpOptions } from './types';
import './legacy';
export { RequestError as HttpError };
export declare class Http<Opts extends HttpOptions = HttpOptions> {
    protected hostType: string;
    private options?;
    constructor(hostType: string, options?: HttpOptions);
    protected request<T>(requestUrl: string | URL, httpOptions?: InternalHttpOptions): Promise<HttpResponse<T>>;
    get(url: string, options?: HttpOptions): Promise<HttpResponse>;
    head(url: string, options?: HttpOptions): Promise<HttpResponse>;
    protected requestBuffer(url: string | URL, httpOptions?: InternalHttpOptions): Promise<HttpResponse<Buffer> | null>;
    getBuffer(url: string, options?: HttpOptions): Promise<HttpResponse<Buffer> | null>;
    private requestJson;
    private resolveArgs;
    getJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    getJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    getJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    headJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    headJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    headJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    postJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    postJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    postJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    putJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    putJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    putJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    patchJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    patchJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    patchJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    deleteJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    deleteJson<T>(url: string, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    deleteJson<T>(url: string, options: Opts, schema: ZodSchema<T>): Promise<HttpResponse<Infer<typeof schema>>>;
    stream(url: string, options?: HttpOptions): NodeJS.ReadableStream;
}
