Skip to content

Commit 9920fd3

Browse files
committed
Adding basic authentication support
Added property "auth" to options class and method "request.auth" to provide basic authentication
1 parent 70737c2 commit 9920fd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

request/request.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ declare module 'request' {
6262
callback?: (error: any, response: any, body: any) => void;
6363
jar?: any; // CookieJar
6464
form?: any; // Object or string
65+
auth?: AuthOptions;
6566
oauth?: OAuthOptions;
6667
aws?: AWSOptions;
6768
hawk ?: HawkOptions;
@@ -107,6 +108,7 @@ declare module 'request' {
107108
multipart(multipart: RequestPart[]): Request;
108109
json(val: any): Request;
109110
aws(opts: AWSOptions, now?: boolean): Request;
111+
auth(username: string, password: string, sendInmediately?: boolean, bearer?: string): Request;
110112
oauth(oauth: OAuthOptions): Request;
111113
jar(jar: CookieJar): Request;
112114

0 commit comments

Comments
 (0)