Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 0 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading