From 202e1b4ec613989f43623d28ebd42cd2ce5f0241 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 20 Apr 2020 02:00:33 +0800 Subject: [PATCH] Minor tweaks --- documentation/advanced-creation.md | 4 ++-- readme.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/advanced-creation.md b/documentation/advanced-creation.md index 482db6900..0f90cc82b 100644 --- a/documentation/advanced-creation.md +++ b/documentation/advanced-creation.md @@ -66,7 +66,7 @@ const limitDownloadUpload = got.extend({ ```js const noUserAgent = got.extend({ headers: { - 'user-agent': null + 'user-agent': undefined } }); ``` @@ -117,7 +117,7 @@ const merged = got.extend(controlRedirects, limitDownloadUpload, httpbin, signRe */ const MEGABYTE = 1048576; - await merged('http://ipv4.download.thinkbroadband.com/5MB.zip', {downloadLimit: MEGABYTE, prefixUrl: ''}); + await merged('https://ipv4.download.thinkbroadband.com/5MB.zip', {downloadLimit: MEGABYTE, prefixUrl: ''}); // CancelError: Exceeded the download limit of 1048576 bytes await merged('https://jigsaw.w3.org/HTTP/300/301.html', {allowedHosts: ['google.com'], prefixUrl: ''}); diff --git a/readme.md b/readme.md index 9dc5241d2..da7e4528a 100644 --- a/readme.md +++ b/readme.md @@ -1321,7 +1321,7 @@ stream.destroy(); ## Cache -Got implements [RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in-memory and is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from the cache, and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behavior in the [`cacheable-request` documentation](https://github.com/lukechilds/cacheable-request). For DNS cache, Got uses [`cacheable-lookup`](https://github.com/szmarczak/cacheable-lookup). +Got implements [RFC 7234](https://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in-memory and is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from the cache, and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behavior in the [`cacheable-request` documentation](https://github.com/lukechilds/cacheable-request). For DNS cache, Got uses [`cacheable-lookup`](https://github.com/szmarczak/cacheable-lookup). You can use the JavaScript `Map` type as an in-memory cache: