Skip to content

Commit

Permalink
fix: add content-type header
Browse files Browse the repository at this point in the history
  • Loading branch information
sandros94 committed May 29, 2024
1 parent d48709f commit 34b33d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/runtime/composables/surreal-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default defineNuxtPlugin(({ $config }) => {

return {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Accept': 'application/json',
..._headers,
...headers,
},
Expand Down

0 comments on commit 34b33d6

Please sign in to comment.