Changed response type to http.IncomingMessage

This commit is contained in:
LeandroDG
2015-05-28 18:13:44 -03:00
parent 9920fd383c
commit 292104d982
+25 -25
View File
@@ -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;