mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #3974] [bug]: REST GET request always send null body #1397
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gturi on GitHub (Apr 12, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3974
Is there an existing issue for this?
Current behavior
When sending a GET request with a body the body is not sent but the curl is correctly generated. Even though a GET request with body is not standard by REST specification it is still possible to create a REST endpoint that accepts a body.
Steps to reproduce
Environment
Production
Version
Cloud
@aryans1319 commented on GitHub (Apr 15, 2024):
Hey @gturi I want to work on this can you assign this to me?
@gturi commented on GitHub (Apr 15, 2024):
@aryans1319 I am not the owner of the repo, so I do not think I can assign it to you. But if you want to work on it, I think you can fork the repo and create a branch that closes this issue
@gturi commented on GitHub (Jun 4, 2024):
@Liamhhhhh even though that product may work, I would prefer to just have it fixed here. Moreover, as far as I know that product is not open source, and I do not want to go back to a Postman-like situation where I get locked in to a closed source vendor which at a certain point decides that all the APIs I develop are must be uploaded to their servers.
@iDschepe commented on GitHub (Dec 17, 2024):
Experiencing the same issue. Would love to see that fixed.
@moaminsharifi commented on GitHub (Jan 27, 2025):
Still not fixed, can I help to fix it?
@jankarres commented on GitHub (Feb 12, 2025):
If no interceptor is used in Hoppscotch, Hoppscotch sends REST API requests with the named problem in the file
hoppscotch-common/src/platform/std/interceptors/browser.tsto the server using Axios. Hoppscotch passes the complete body of the GET request to axios asdata.Axios adheres to standards. RFC 7231 states:
Axios therefore rejects the body in accordance with the standard. The “problem” is therefore not with Hoppscotch, but with Axios, which adheres to the defined standard.
However, bodies are still used in GET requests in some APIs. One possible solution would be to configure Axios in such a way that it forces Axios to send the body with GET requests, contrary to the standard (this is what e.g. Postman basically does):
If the Hoppscotch team want to allow using this not standard conform behavior is up to them.
@btrazzini commented on GitHub (Apr 3, 2025):
How do I fix using Hoppscotch web?
@pedrojreis commented on GitHub (Feb 13, 2026):
Damn what a trip i had debuging my api calls due to this :) a client does require a body with GET and I was getting blocked haha
Any news on this? :)
Funny enough if we use hoppscotch proxy the body is sent :D