Skip to content

Commit e393662

Browse files
authored
Fix method option example (#2034)
1 parent 9022f96 commit e393662

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

documentation/2-options.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ The most common methods are: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`.
220220
```js
221221
import got from 'got';
222222

223-
const {method} = await got.post('https://httpbin.org/anything').json();
223+
const {method} = await got('https://httpbin.org/anything', {
224+
method: 'POST'
225+
}).json();
224226

225227
console.log(method);
226228
// => 'POST'

0 commit comments

Comments
 (0)