import Wreck from '@hapi/wreck';
export type Method = keyof Pick<typeof Wreck, 'get' | 'post' | 'put' | 'delete'>;
export type RequestOptions = Parameters<typeof Wreck.defaults>[0];
export declare const request: <BodyType = Buffer>(method: Method, url: string, options?: RequestOptions) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | NonNullable<BodyType>;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
export declare const get: <BodyType>(url: string, options?: RequestOptions) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | NonNullable<BodyType>;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
export declare const getJson: <BodyType extends object>(url: string) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | BodyType;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
export declare const post: <BodyType>(url: string, options: RequestOptions) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | NonNullable<BodyType>;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
export declare const postJson: <BodyType extends object>(url: string, options: RequestOptions) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | BodyType;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
export declare const put: <BodyType>(url: string, options: RequestOptions) => Promise<{
    res: import("http").IncomingMessage;
    error: Error | NonNullable<BodyType>;
    payload?: undefined;
} | {
    res: import("http").IncomingMessage;
    payload: BodyType;
    error?: undefined;
}>;
