Skip to content

Commit

Permalink
Fix method option example (#2034)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdiogo authored Apr 21, 2022
1 parent 9022f96 commit e393662
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion documentation/2-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e393662

Please sign in to comment.