From 9920fd383c8a426d91eaae34ed33ab23046d8ae5 Mon Sep 17 00:00:00 2001 From: LeandroDG Date: Thu, 28 May 2015 13:25:04 -0300 Subject: [PATCH] Adding basic authentication support Added property "auth" to options class and method "request.auth" to provide basic authentication --- request/request.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/request/request.d.ts b/request/request.d.ts index eff35ada60..e94a04ad10 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -62,6 +62,7 @@ declare module 'request' { callback?: (error: any, response: any, body: any) => void; jar?: any; // CookieJar form?: any; // Object or string + auth?: AuthOptions; oauth?: OAuthOptions; aws?: AWSOptions; hawk ?: HawkOptions; @@ -107,6 +108,7 @@ declare module 'request' { multipart(multipart: RequestPart[]): Request; json(val: any): Request; aws(opts: AWSOptions, now?: boolean): Request; + auth(username: string, password: string, sendInmediately?: boolean, bearer?: string): Request; oauth(oauth: OAuthOptions): Request; jar(jar: CookieJar): Request;