/// <reference types="node" />
/// <reference types="node" />
import { RequestError } from 'got';
import { infer as Infer, ZodType } from 'zod';
import type { HttpOptions, HttpRequestOptions, 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 & HttpRequestOptions<T>): Promise<HttpResponse<T>>;
    get(url: string, options?: HttpOptions & HttpRequestOptions<string>): Promise<HttpResponse>;
    head(url: string, options?: HttpOptions): Promise<HttpResponse>;
    getBuffer(url: string, options?: HttpOptions): Promise<HttpResponse<Buffer>>;
    private requestJson;
    private resolveArgs;
    getJson<ResT>(url: string, options?: Opts & HttpRequestOptions<ResT>): Promise<HttpResponse<ResT>>;
    getJson<ResT, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    getJson<ResT, Schema extends ZodType<ResT> = ZodType<ResT>>(url: string, options: Opts & HttpRequestOptions<Infer<Schema>>, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    headJson(url: string, httpOptions?: Opts): Promise<HttpResponse<never>>;
    postJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    postJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    putJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    putJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    patchJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    patchJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    deleteJson<T>(url: string, options?: Opts): Promise<HttpResponse<T>>;
    deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    deleteJson<T, Schema extends ZodType<T> = ZodType<T>>(url: string, options: Opts, schema: Schema): Promise<HttpResponse<Infer<Schema>>>;
    stream(url: string, options?: HttpOptions): NodeJS.ReadableStream;
}
