nuxt / nuxt/devtools

fix: GET request are called with `application/json` value in Content-Type

Open
#691 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.3k
Forks
214
Avg merge
13h 22m
Merged PRs (30d)
18

Description

🐛 The bug

DevTools are adding Content-Type header with application/json value to GET requests.

According to RFC 7231:

A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

GET request shouldn't be sending a body thus application/json value doesn't fit.

🛠️ To reproduce

https://github.com/filipfdevelit/repl-nuxt-dev-tools-content-type-get-request

🌈 Expected behavior

DevTools are not adding application/json to Content-Type header for GET requests.

ℹ️ Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked reproduction and inspecting the DevTools request path for GET requests. Confirm the current Content-Type behavior, then verify that GET requests no longer receive application/json and that the reproduction still works as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.