You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ofetch/$fetch same as native fetch is stateless by-design. This has safety advantages when ofetch is deeply integrated into tools such as Nitro and Nuxt and prevents global side effects and potential header leaks.
However, there are also good use cases of having stateful fetch instances:
@guyaumetremblay ofetch.create creates instance with immutable defaults. this version has mutable state (and most importantly working cookies, just like a browser tab)
Describe the feature
ofetch
/$fetch
same as native fetch is stateless by-design. This has safety advantages when ofetch is deeply integrated into tools such as Nitro and Nuxt and prevents global side effects and potential header leaks.However, there are also good use cases of having stateful fetch instances:
I think
$fetch.withState()
could be useful.The text was updated successfully, but these errors were encountered: