Comparing version 12.0.0-beta.3 to 12.0.0-beta.4
@@ -85,3 +85,3 @@ "use strict"; | ||
}); | ||
if (!(is_1.default.object(response) && is_1.default.number(response.statusCode) && response.body)) { | ||
if (!(is_1.default.object(response) && is_1.default.number(response.statusCode) && !is_1.default.nullOrUndefined(response.body))) { | ||
throw new TypeError('The `afterResponse` hook returned an invalid value'); | ||
@@ -88,0 +88,0 @@ } |
@@ -160,3 +160,2 @@ /// <reference types="node" /> | ||
Called with [response object](#response) and a retry function. | ||
Calling the retry function will trigger `beforeRetry` hooks. | ||
@@ -168,2 +167,5 @@ Each function should return the response. | ||
__Note__: Calling the `retryWithMergedOptions` function will trigger `beforeRetry` hooks. If the retry is successful, all remaining `afterResponse` hooks will be called. In case of an error, `beforeRetry` hooks will be called instead. | ||
Meanwhile the `init`, `beforeRequest` , `beforeRedirect` as well as already executed `afterResponse` hooks will be skipped. | ||
@example | ||
@@ -1036,2 +1038,3 @@ ``` | ||
createNativeRequestOptions(): { | ||
ALPNProtocols: string[] | undefined; | ||
ca: string | Buffer | (string | Buffer)[] | undefined; | ||
@@ -1038,0 +1041,0 @@ cert: string | Buffer | (string | Buffer)[] | undefined; |
@@ -1552,2 +1552,3 @@ "use strict"; | ||
// HTTPS options | ||
ALPNProtocols: https.alpnProtocols, | ||
ca: https.certificateAuthority, | ||
@@ -1554,0 +1555,0 @@ cert: https.certificate, |
{ | ||
"name": "got-cjs", | ||
"version": "12.0.0-beta.3", | ||
"version": "12.0.0-beta.4", | ||
"description": "Human-friendly and powerful HTTP request library for Node.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -153,2 +153,3 @@ <div align="center"> | ||
- [`got-fetch`](https://github.com/alexghr/got-fetch) - Got with a [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) interface | ||
- [`got-scraping`](https://github.com/apify/got-scraping) - Got wrapper specifically designed for web scraping purposes | ||
@@ -452,2 +453,7 @@ ### Legacy | ||
</td> | ||
<td align="center"> | ||
<a href="https://apify.com"> | ||
<img width="150" valign="middle" src="https://user-images.githubusercontent.com/23726914/128673143-958b5930-b677-40ef-8087-5698a0c29c45.png"> | ||
</a> | ||
</td> | ||
</tr> | ||
@@ -503,2 +509,6 @@ </tbody> | ||
> Got has been a crucial component of Apify's scraping for years. We use it to extract data from billions of web pages every month, and we really appreciate the powerful API and extensibility, which allowed us to build our own specialized HTTP client on top of Got. The support has always been stellar too. | ||
> | ||
> — <a href="https://github.com/mnmkng">Ondra Urban</a> | ||
## For enterprise | ||
@@ -505,0 +515,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
250407
5430
516