diff --git a/request/request.d.ts b/request/request.d.ts index e94a04ad1..e16eafadb 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -15,40 +15,40 @@ declare module 'request' { export = RequestAPI; - function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; - function RequestAPI(uri: string, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; - function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: any, body: any) => void): RequestAPI.Request; + function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; module RequestAPI { export function defaults(options: Options): typeof RequestAPI; - export function request(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function request(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function request(options?: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function request(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function get(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function get(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function get(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function get(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function post(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function post(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function post(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function post(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function put(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function put(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function put(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function put(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function head(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function head(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function head(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function head(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function patch(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function patch(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function patch(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function patch(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function del(uri: string, options?: Options, callback?: (error: any, response: any, body: any) => void): Request; - export function del(uri: string, callback?: (error: any, response: any, body: any) => void): Request; - export function del(options: Options, callback?: (error: any, response: any, body: any) => void): Request; + export function del(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; export function forever(agentOptions: any, optionsArg: any): Request; export function jar(): CookieJar; @@ -59,7 +59,7 @@ declare module 'request' { export interface Options { url?: string; uri?: string; - callback?: (error: any, response: any, body: any) => void; + callback?: (error: any, response: http.IncomingMessage, body: any) => void; jar?: any; // CookieJar form?: any; // Object or string auth?: AuthOptions;