diff --git a/src/runtime/composables/surreal-fetch.ts b/src/runtime/composables/surreal-fetch.ts index eb4ec51..b99b90e 100644 --- a/src/runtime/composables/surreal-fetch.ts +++ b/src/runtime/composables/surreal-fetch.ts @@ -49,7 +49,8 @@ export function useSurrealFetch<T = any>( return useFetch(endpoint, { ...opts, headers: { - Accept: 'application/json', + 'Content-Type': 'application/json', + 'Accept': 'application/json', ...opts.headers, ...headers, }, diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts index 6ae2784..aa5224d 100644 --- a/src/runtime/plugin.ts +++ b/src/runtime/plugin.ts @@ -71,7 +71,8 @@ export default defineNuxtPlugin(({ $config }) => { return { headers: { - Accept: 'application/json', + 'Content-Type': 'application/json', + 'Accept': 'application/json', ..._headers, ...headers, },