Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: HEAD or GET Request cannot have a body. #402

Closed
huanghaiyang opened this issue Sep 29, 2016 · 3 comments
Closed

TypeError: HEAD or GET Request cannot have a body. #402

huanghaiyang opened this issue Sep 29, 2016 · 3 comments

Comments

@huanghaiyang
Copy link

should HEAD or GET can not add a body ?

@jeffhuys
Copy link

HEAD or GET requests should never have a body. Be sure you give body: undefined. null is not the same as "nothing".

@radiosilence
Copy link

@jeffhuys Surely there should be an override for this? We don't always control the APIs we talk to, especially if they are written by another company. It seems extremely patronising to actively prevent people doing this.

@nshgraph
Copy link

nshgraph commented Feb 4, 2020

Stating that a GET request should never have a body is not in the HTTP spec. https://tools.ietf.org/html/rfc7231#section-4.3.1

Elasticache is the primary example of an api that uses bodies in GET requests.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants