fix(nuxt): add a doc comment describing the omission of the body for GET and HEAD requests (nuxt#20667)

This commit is contained in:
Connor van Spronssen 2025-01-06 21:47:58 +01:00
parent f1651149bf
commit 4d6d5a7fe7

View File

@ -27,6 +27,11 @@ interface NitroFetchOptions<R extends NitroFetchRequest, M extends AvailableRout
type ComputedFetchOptions<R extends NitroFetchRequest, M extends AvailableRouterMethod<R>> = ComputedOptions<NitroFetchOptions<R, M>>
/**
* Options for the useFetch composable.
* For GET and HEAD requests, the body property is automatically
* omitted to align with HTTP/1.1 specifications (RFC 7231).
*/
export type UseFetchOptions<
ResT,
DataT = ResT,