mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Changed response type to http.IncomingMessage
This commit is contained in:
Vendored
+25
-25
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user