mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #210] I can't send POST method #76
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#76
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 @turbobin on GitHub (Oct 24, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/210
hi,
I meet a strange problem, when I choose POST method to send, it always turn on OPTIONS, why ? look at the image:
@liyasthomas commented on GitHub (Oct 24, 2019):
@turbobin Thanks for reporting the bug. Sorry for the inconveniences caused. Could you please share the API endpoints so that we could run some manual tests.
We couldn't reproduce the issue with any other endpoints. Meanwhile, you can try sending requests in Content Type:
application/jsonand see if the issue persists.@NBTX commented on GitHub (Oct 25, 2019):
The
OPTIONSrequest being sent first is a CORS preflight request that gets made automatically whenPOSTing data to a server. ThePOSTrequest doesn't get sent as theOPTIONSpreflight request is failing.This is a 'feature' of the browser that we have no control over, so this issue will require use of the Postwoman proxy.
EDIT: You can read more about preflight requests here; https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
@NBTX commented on GitHub (Oct 25, 2019):
Also @liyasthomas we could perhaps try and detect this (for the purposes of prompting the user to turn on the proxy) by sending our own preflight request first if the proxy is turned off (i.e. just making a request to
OPTIONS) - we'd get an 'opaque' response but it would be enough to know it's going to fail and therefore know that we need to prompt the user with a message.@liyasthomas commented on GitHub (Oct 25, 2019):
Thats doable. Now we check
Access-Control-Allow-Origin: *to detect whether CORS occur or not. Think we could op for this method instead.@liyasthomas commented on GitHub (Nov 7, 2019):
Closing this issues since it's a possible duplicate of #274