got
Advanced tools
Comparing version 12.0.0 to 12.0.1
@@ -5,3 +5,4 @@ /// <reference types="node" /> | ||
import { checkServerIdentity } from 'node:tls'; | ||
import { request as httpsRequest } from 'node:https'; | ||
import http from 'node:http'; | ||
import https from 'node:https'; | ||
import type { Readable } from 'node:stream'; | ||
@@ -1178,3 +1179,3 @@ import type { Socket } from 'node:net'; | ||
family: DnsLookupIpVersion; | ||
agent: false | Agents | HttpAgent | undefined; | ||
agent: false | Agents | http.Agent | undefined; | ||
setHost: boolean; | ||
@@ -1197,3 +1198,3 @@ method: Method; | ||
auth?: string | null | undefined; | ||
_defaultAgent?: HttpAgent | undefined; | ||
_defaultAgent?: http.Agent | undefined; | ||
clientCertEngine?: string | undefined; | ||
@@ -1212,6 +1213,6 @@ privateKeyEngine?: string | undefined; | ||
}; | ||
getRequestFunction(): RequestFunction | typeof httpsRequest | undefined; | ||
getFallbackRequestFunction(): RequestFunction | typeof httpsRequest | undefined; | ||
getRequestFunction(): RequestFunction | typeof https.request | undefined; | ||
getFallbackRequestFunction(): RequestFunction | typeof https.request | undefined; | ||
freeze(): void; | ||
} | ||
export {}; |
@@ -5,4 +5,5 @@ import process from 'node:process'; | ||
import { checkServerIdentity } from 'node:tls'; | ||
import { request as httpRequest } from 'node:http'; | ||
import { request as httpsRequest } from 'node:https'; | ||
// DO NOT use destructuring for `https.request` and `http.request` as it's not compatible with `nock`. | ||
import http from 'node:http'; | ||
import https from 'node:https'; | ||
import is, { assert } from '@sindresorhus/is'; | ||
@@ -1586,5 +1587,5 @@ import lowercaseKeys from 'lowercase-keys'; | ||
} | ||
return httpsRequest; | ||
return https.request; | ||
} | ||
return httpRequest; | ||
return http.request; | ||
} | ||
@@ -1591,0 +1592,0 @@ freeze() { |
@@ -7,2 +7,3 @@ declare const got: import("./types.js").Got; | ||
export * from './core/response.js'; | ||
export type { default as Request } from './core/index.js'; | ||
export * from './core/index.js'; | ||
@@ -9,0 +10,0 @@ export * from './core/errors.js'; |
{ | ||
"name": "got", | ||
"version": "12.0.0", | ||
"version": "12.0.1", | ||
"description": "Human-friendly and powerful HTTP request library for Node.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
244110
5388