nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

Documentation: Describe the new useFetch() behavior

Open leoboyerbx opened this issue 2 years ago • 1 comments

Describe the feature

Since Nuxt 3.2, useFetch automatically passes request data to api call in an SSR context. The steps described in the docs aren't needed anymore: https://nuxt.com/docs/getting-started/data-fetching#example-pass-client-headers-to-the-api

I think we shouldn't remove this section right away, but I propose to add a small alert in the docs saying that this change is not necessary anymore.

Additional information

  • [X] Would you be willing to help implement this feature?
  • [ ] Could this feature be implemented as a module?

Final checks

leoboyerbx avatar Feb 09 '23 19:02 leoboyerbx

AFAIK, this should still be needed if requesting an external API. This should be clear in the docs whenever using useRequestHeaders() is needed or not

leoboyerbx avatar Feb 09 '23 19:02 leoboyerbx