allow use of https request options

This commit is contained in:
David Rodrigue
2018-09-20 10:49:19 -05:00
parent 14d0a6329a
commit 958c9f2ae6
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -258,3 +258,5 @@ got('todomvc', {
got(new url.URL('http://todomvc.com'));
got(url.parse('http://todomvc.com'));
got('https://todomvc.com', { rejectUnauthorized: false });
+2 -2
View File
@@ -75,7 +75,7 @@ declare const got: got.GotFn &
CancelError: typeof CancelError;
};
interface InternalRequestOptions extends http.RequestOptions {
interface InternalRequestOptions extends https.RequestOptions {
// Redeclare options with `any` type for allow specify types incompatible with http.RequestOptions.
timeout?: any;
agent?: any;
@@ -93,7 +93,7 @@ declare namespace got {
type GotStreamFn = (url: GotUrl, options?: GotOptions<string | null>) => GotEmitter & nodeStream.Duplex;
type GotUrl = string | http.RequestOptions | Url | URL;
type GotUrl = string | https.RequestOptions | Url | URL;
interface GotBodyOptions<E extends string | null> extends GotOptions<E> {
body?: string | Buffer | nodeStream.Readable;