@@ -15,40 +15,40 @@ declare module 'request' {
15
15
16
16
export = RequestAPI ;
17
17
18
- function RequestAPI ( uri : string , options ?: RequestAPI . Options , callback ?: ( error : any , response : any , body : any ) => void ) : RequestAPI . Request ;
19
- function RequestAPI ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : RequestAPI . Request ;
20
- function RequestAPI ( options : RequestAPI . Options , callback ?: ( error : any , response : any , body : any ) => void ) : RequestAPI . Request ;
18
+ function RequestAPI ( uri : string , options ?: RequestAPI . Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : RequestAPI . Request ;
19
+ function RequestAPI ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : RequestAPI . Request ;
20
+ function RequestAPI ( options : RequestAPI . Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : RequestAPI . Request ;
21
21
22
22
module RequestAPI {
23
23
export function defaults ( options : Options ) : typeof RequestAPI ;
24
24
25
- export function request ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
26
- export function request ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
27
- export function request ( options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
25
+ export function request ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
26
+ export function request ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
27
+ export function request ( options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
28
28
29
- export function get ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
30
- export function get ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
31
- export function get ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
29
+ export function get ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
30
+ export function get ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
31
+ export function get ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
32
32
33
- export function post ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
34
- export function post ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
35
- export function post ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
33
+ export function post ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
34
+ export function post ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
35
+ export function post ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
36
36
37
- export function put ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
38
- export function put ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
39
- export function put ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
37
+ export function put ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
38
+ export function put ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
39
+ export function put ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
40
40
41
- export function head ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
42
- export function head ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
43
- export function head ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
41
+ export function head ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
42
+ export function head ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
43
+ export function head ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
44
44
45
- export function patch ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
46
- export function patch ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
47
- export function patch ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
45
+ export function patch ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
46
+ export function patch ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
47
+ export function patch ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
48
48
49
- export function del ( uri : string , options ?: Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
50
- export function del ( uri : string , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
51
- export function del ( options : Options , callback ?: ( error : any , response : any , body : any ) => void ) : Request ;
49
+ export function del ( uri : string , options ?: Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
50
+ export function del ( uri : string , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
51
+ export function del ( options : Options , callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ) : Request ;
52
52
53
53
export function forever ( agentOptions : any , optionsArg : any ) : Request ;
54
54
export function jar ( ) : CookieJar ;
@@ -59,9 +59,10 @@ declare module 'request' {
59
59
export interface Options {
60
60
url ?: string ;
61
61
uri ?: string ;
62
- callback ?: ( error : any , response : any , body : any ) => void ;
62
+ callback ?: ( error : any , response : http . IncomingMessage , body : any ) => void ;
63
63
jar ?: any ; // CookieJar
64
64
form ?: any ; // Object or string
65
+ auth ?: AuthOptions ;
65
66
oauth ?: OAuthOptions ;
66
67
aws ?: AWSOptions ;
67
68
hawk ?: HawkOptions ;
@@ -107,6 +108,7 @@ declare module 'request' {
107
108
multipart ( multipart : RequestPart [ ] ) : Request ;
108
109
json ( val : any ) : Request ;
109
110
aws ( opts : AWSOptions , now ?: boolean ) : Request ;
111
+ auth ( username : string , password : string , sendInmediately ?: boolean , bearer ?: string ) : Request ;
110
112
oauth ( oauth : OAuthOptions ) : Request ;
111
113
jar ( jar : CookieJar ) : Request ;
112
114
0 commit comments