diff --git a/README.md b/README.md index e2d38420..a856eb24 100644 --- a/README.md +++ b/README.md @@ -208,14 +208,19 @@ export default defineNitroPlugin(() => { ## Server-Side Rendering -You can make authenticated requests both from the client and the server. However, you must use `useRequestFetch()` to make authenticated requests during SSR. +You can make authenticated requests both from the client and the server. However, you must use `useRequestFetch()` to make authenticated requests during SSR if you are not using `useFetch()` -```ts -// In your script setup -const { data } = await useRequestFetch()('/api/protected-endpoint'); +```vue + ``` -> There's [an open issue](https://github.com/nuxt/nuxt/issues/24813) to include credentials in `$fetch`/`useFetch` in Nuxt. +> There's [an open issue](https://github.com/nuxt/nuxt/issues/24813) to include credentials in `$fetch` in Nuxt. ## Configuration