///
///
import type http from 'node:http';
import type url from 'node:url';
/**
* Request arguments.
*/
export type RequestArgs = {
/**
* URL.
*/
url: url.URL;
/**
* User agent.
*/
userAgent?: string;
/**
* Token.
*/
token?: string;
/**
* Callback.
*/
cb: (res: http.IncomingMessage) => T | Promise;
};
/**
* Request.
*
* @param args - Arguments.
* @returns T.
*/
export declare function request(args: RequestArgs): Promise;
/**
* Request download arguments.
*/
export type RequestDownloadArgs = Omit, 'cb'> & {
/**
* Destination path.
*/
destination: string;
};
/**
* Request download.
*
* @param args - Arguments.
*/
export declare function requestDownload(args: RequestDownloadArgs): Promise;
/**
* Request download arguments.
*/
export type RequestJSONArgs = Omit, 'cb'>;
/**
* Request JSON.
*
* @param args - Arguments.
* @returns T.
*/
export declare function requestJSON(args: RequestJSONArgs): Promise;