Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nock compatibility #1959

Merged
merged 3 commits into from Jan 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/core/options.ts
Expand Up @@ -3,8 +3,8 @@ import {Buffer} from 'node:buffer';
import {promisify, inspect} from 'node:util';
import {URL, URLSearchParams} from 'node:url';
import {checkServerIdentity} from 'node:tls';
import {request as httpRequest} from 'node:http';
import {request as httpsRequest} from 'node:https';
import http from 'node:http';
import https from 'node:https';
sindresorhus marked this conversation as resolved.
Show resolved Hide resolved
import type {Readable} from 'node:stream';
import type {Socket} from 'node:net';
import type {SecureContextOptions, DetailedPeerCertificate} from 'node:tls';
Expand Down Expand Up @@ -2447,10 +2447,10 @@ export default class Options {
return http2wrapper.auto as RequestFunction;
}

return httpsRequest;
return https.request;
}

return httpRequest;
return http.request;
}

freeze() {
Expand Down