Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/content/3.api/1.composables/use-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function useFetch(
type UseFetchOptions = {
method?: string,
params?: SearchParams,
body?: RequestInit['body'] | Record<string, any>
headers?: {key: string, value: string}[],
baseURL?: string,
server?: boolean
Expand All @@ -33,9 +34,10 @@ type DataT = {
## Params

* **Url**: The URL to fetch
* **Options (from [ohmyfetch](https://github.com/unjs/ohmyfetch))**:
* **Options (extends [unjs/ohmyfetch](https://github.com/unjs/ohmyfetch) options & [AsyncDataOptions](/api/composables/use-async-data#params))**:
* `method`: Request method
* `params`: Query params
* `body`: Request body - automatically stringified (if an object is passed).
* `headers`: Request headers
* `baseURL`: Base URL for the request
* **Options (from `useAsyncData`)**:
Expand Down