Skip to content

Commit

Permalink
fix: readme example codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mainarthur authored and ronag committed Jun 12, 2022
1 parent bfd5199 commit e00bd1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ Help us improve the test coverage by following instructions at [nodejs/undici/#9
Basic usage example:

```js
import {fetch} from 'undici';
import { fetch } from 'undici';

async function fetchJson() {
const res = await fetch('https://example.com')
const json = await res.json()
console.log(json);
}
async function fetchJson() {
const res = await fetch('https://example.com')
const json = await res.json()
console.log(json);
}
```

You can pass an optional dispatcher to `fetch` as:
Expand Down

0 comments on commit e00bd1d

Please sign in to comment.