Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
chore: lint docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 10, 2022
1 parent e3af568 commit be80360
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/content/3.api/1.composables/use-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const { data, pending, error, refresh } = await useFetch('https://api.nuxtjs.dev
pick: ['title']
})
```

Adding Query Search Params:

Using the `query` option, you can add search parameters to your query. This option is extended from [unjs/ohmyfetch](https://github.com/unjs/ohmyfetch) and is using [ufo](https://github.com/unjs/ufo) to create the URL. Objects are automatically stringified.
Expand All @@ -98,6 +99,7 @@ const { data, pending, error, refresh } = await useFetch('https://api.nuxtjs.dev
query: { param1, param2: 'value2' }
})
```

Results in `https://api.nuxtjs.dev/mountains?param1=value1&param2=value2`

Using [interceptors](https://github.com/unjs/ohmyfetch#%EF%B8%8F-interceptors):
Expand Down

0 comments on commit be80360

Please sign in to comment.