mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs: useFetch
uses isomorphic $fetch
(#5769)
This commit is contained in:
parent
f321a56e63
commit
c88e1716ab
@ -184,7 +184,7 @@ When we call `fetch` in the browser, user headers like `cookie` will be directly
|
|||||||
|
|
||||||
We can use [`useRequestHeaders`](/api/composables/use-request-headers) to access and proxy cookies to the API from server-side.
|
We can use [`useRequestHeaders`](/api/composables/use-request-headers) to access and proxy cookies to the API from server-side.
|
||||||
|
|
||||||
The example below adds the request headers to an isomorphic `fetch` call to ensure that the API endpoint has access to the same `cookie` header originally sent by the user.
|
The example below adds the request headers to an isomorphic `$fetch` call to ensure that the API endpoint has access to the same `cookie` header originally sent by the user.
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<script setup>
|
<script setup>
|
||||||
|
Loading…
Reference in New Issue
Block a user