/// import { Response } from './response'; import { OutgoingHttpHeaders } from 'http2'; declare type ResponseCallback = (err: Error, data: Response) => void; declare type RequestOptions = { method?: string | undefined; port?: string | number | undefined; params?: object | undefined; json?: object | undefined; raw_data?: string | Buffer | undefined; headers?: OutgoingHttpHeaders | undefined; cookies?: Array | undefined; useragent?: string | undefined; timeout?: number | undefined; follow_redirects?: boolean | undefined; max_redirects?: number | undefined; worldwide?: boolean | undefined; callback?: ResponseCallback | undefined; /** * @deprecated * @description DO NOT USE!!! It's used internally * TODO: Do not expose it here */ redirects?: number | undefined; }; /** * Base requests function * * @function * @param {RequestOptions | ResponseCallback} err * @param {ResponseCallback} data * @returns {Promise} * @returns */ declare function request(url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback): Promise; declare const get: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const post: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const head: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const put: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const connect: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const options: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const trace: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; declare const patch: (url: string, options?: RequestOptions | ResponseCallback, callback?: ResponseCallback) => Promise; export { request, get, post, head, put, connect, options, trace, patch };