From 4d6d5a7fe7464e11417f26959fce123d3ab18a07 Mon Sep 17 00:00:00 2001 From: Connor van Spronssen Date: Mon, 6 Jan 2025 21:47:58 +0100 Subject: [PATCH] fix(nuxt): add a doc comment describing the omission of the body for GET and HEAD requests (nuxt#20667) --- packages/nuxt/src/app/composables/fetch.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index 3701153cf4..6855b6cdfc 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -27,6 +27,11 @@ interface NitroFetchOptions> = ComputedOptions> +/** + * 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,