From 630983539fdeea605055b01b511f0c3ec6117f16 Mon Sep 17 00:00:00 2001 From: Dave Scotese Date: Mon, 16 Sep 2024 10:48:34 -0700 Subject: [PATCH 1/2] Update 2-options.md (Foo -> foo) --- documentation/2-options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/2-options.md b/documentation/2-options.md index 7b745bbd1..8a25d6b0f 100644 --- a/documentation/2-options.md +++ b/documentation/2-options.md @@ -28,11 +28,11 @@ const options = new Options({ } }); -options.headers.foo = 'bar'; +options.headers. = 'bar'; // Note that `Options` stores normalized options, therefore it needs to be passed as the third argument. const {headers} = await got('anything', undefined, options).json(); -console.log(headers.Foo); +console.log(headers.foo); //=> 'bar' ``` @@ -52,7 +52,7 @@ options.headers.foo = 'bar'; // Note that `options` is a plain object, therefore it needs to be passed as the second argument. const {headers} = await got('anything', options).json(); -console.log(headers.Foo); +console.log(headers.foo); //=> 'bar' ``` From 8f453053f38b4edf5bc30d36fc70e26777c9f88f Mon Sep 17 00:00:00 2001 From: Dave Scotese Date: Mon, 16 Sep 2024 10:50:21 -0700 Subject: [PATCH 2/2] Update 2-options.md --- documentation/2-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/2-options.md b/documentation/2-options.md index 8a25d6b0f..b3c0e798a 100644 --- a/documentation/2-options.md +++ b/documentation/2-options.md @@ -28,7 +28,7 @@ const options = new Options({ } }); -options.headers. = 'bar'; +options.headers.foo = 'bar'; // Note that `Options` stores normalized options, therefore it needs to be passed as the third argument. const {headers} = await got('anything', undefined, options).json();