From e3936629ce8b075749f33260b8cf036c7832e448 Mon Sep 17 00:00:00 2001 From: Diogo Silva Date: Thu, 21 Apr 2022 19:30:00 +0100 Subject: [PATCH] Fix `method` option example (#2034) --- documentation/2-options.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/2-options.md b/documentation/2-options.md index 968a22baa..f5e10669a 100644 --- a/documentation/2-options.md +++ b/documentation/2-options.md @@ -220,7 +220,9 @@ The most common methods are: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`. ```js import got from 'got'; -const {method} = await got.post('https://httpbin.org/anything').json(); +const {method} = await got('https://httpbin.org/anything', { + method: 'POST' +}).json(); console.log(method); // => 'POST'