Skip to content

Commit

Permalink
Fix .json() usage in readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Nov 23, 2019
1 parent 2c5d0c0 commit b7a356a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -258,7 +258,7 @@ The promise has `.json()` and `.buffer()` and `.text()` functions which set this
Example:

```js
const {body} = await got(url).json();
const body = await got(url).json();
```

###### resolveBodyOnly
Expand Down Expand Up @@ -1333,7 +1333,7 @@ To receive a JSON body you can either set `responseType` option to `json` or use
const got = require('got');

(async () => {
const {body} = await got.post('https://httpbin.org/anything', {
const body = await got.post('https://httpbin.org/anything', {
body: {
hello: 'world'
}
Expand Down

0 comments on commit b7a356a

Please sign in to comment.