diff --git a/src/Request.ts b/src/Request.ts index 0d91a8d6..66c20da8 100644 --- a/src/Request.ts +++ b/src/Request.ts @@ -161,6 +161,12 @@ export type RequestOptions = { /** Default: `64 KiB` */ highWaterMark?: number; signal?: AbortSignal | EventEmitter; + /** + * If `true`, the server certificate is verified against the list of supplied CAs. + * An 'error' event is emitted if verification fails. + * Default: `true` + */ + rejectUnauthorized?: boolean; }; export type RequestMeta = { diff --git a/src/index.ts b/src/index.ts index 525679bb..b94e70d5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -50,12 +50,6 @@ export function getDefaultHttpClient(rejectUnauthorized?: boolean, allowH2?: boo } interface UrllibRequestOptions extends RequestOptions { - /** - * If `true`, the server certificate is verified against the list of supplied CAs. - * An 'error' event is emitted if verification fails. - * Default: `true` - */ - rejectUnauthorized?: boolean; /** Allow to use HTTP2 first. Default is `false` */ allowH2?: boolean; }