mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #443] cookie not found support #167
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#167
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 @BruceWayneVsSuperMan on GitHub (Dec 19, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/443
Our server responsed cookie not found error.
But actually,with the same param postman worked.
I wonder know if I need to add some extra param when I use postwoman.
@liyasthomas commented on GitHub (Dec 19, 2019):
Under normal conditions, params are sent as (async/await XHR) HTTP requests. If there's any specific criteria for your server, you've to append that information either in params or headers as server request.
@BruceWayneVsSuperMan commented on GitHub (Dec 19, 2019):
Thanks for your reply.
I understand your meaning. But the thing I do want to know is how to make it work like postman.
Means that I don't need to add cookie or login info.
I want to use postwoman replace postman.Because I think it looks beautiful and I can use it in explore.
@liyasthomas commented on GitHub (Dec 19, 2019):
Let me look into the issue and get back to you after a while. I think there's an option to use cookies with
withCredentials: true@BruceWayneVsSuperMan commented on GitHub (Dec 19, 2019):
All right, waiting for your good news.
@liyasthomas commented on GitHub (Dec 22, 2019):
Nuxt Axios module currently support credentials option only work when axios request to
baseURLor relative path.This is in the specification, not a bug.
https://github.com/nuxt-community/axios-module/issues/168#issuecomment-471670927
@NBTX commented on GitHub (Dec 22, 2019):
I'm reading that we can just set
withCredentials: trueto the.$postoptions...@liyasthomas commented on GitHub (Dec 22, 2019):
But isn't that only supposed to be working on requests sent to same origin?
@BruceWayneVsSuperMan commented on GitHub (Dec 23, 2019):
I just found something that may help us.
Please see this pic.
I am wondering if the secret is the postman-token param.
@BruceWayneVsSuperMan commented on GitHub (Dec 23, 2019):
If you can't see this pic, leave me a message.Cause I was limited on internet,and I can't see if it's uploaded.
@liyasthomas commented on GitHub (Dec 23, 2019):
Can't see the image.
@BruceWayneVsSuperMan commented on GitHub (Dec 23, 2019):
Very appreciate for your patience and help.
I sent it to your email.Please check it out.
@liyasthomas commented on GitHub (Dec 23, 2019):
Got the mail. It seems like, a cookie is sent as a custom header along with the request.
In PW, you can add custom Headers too. In Options section, navigate to Headers tab to add custom headers.
But I wonder how you generated this custom header
postman-token's value? I suppose you took Cookie from Environment variables.Here's a screenshot of how I added a custom header and generated cURL code snippet with PW.
If you've limited internet access, no need to download the image, this is the generated cURL:
And here's your public Sharable link with above configuration: https://postwoman.io/?method=GET&url=https%3A%2F%2Freqres.in&path=%2Fapi%2Fusers&headers=%5B%7B%22key%22%3A%22cache-control%22,%22value%22%3A%22no-cache%22%7D,%7B%22key%22%3A%22postwoman-token%22,%22value%22%3A%22this_can_whatever_you_want%22%7D,%7B%22key%22%3A%22content-type%22,%22value%22%3A%22application%2Fjson%22%7D%5D&rawParams=%7B%7D
Open this link to preload configs
@BruceWayneVsSuperMan commented on GitHub (Dec 23, 2019):
Emmm…… actually,I didn't add the postman-token. Everytime when I try to request, postman will generate a new postman-token.
I read an article about it, this is the answer.
This is primarily used to bypass a bug in Chrome. If an XMLHttpRequest is pending and another request is sent with the same parameters then Chrome returns the same response for both of them. Sending a random token avoids this issue. This can also help you distinguish between request on the server side.
@liyasthomas commented on GitHub (Dec 23, 2019):
Thanks! Will look into it
Sooner or later, we're gonna have to implement this 😊
@BruceWayneVsSuperMan commented on GitHub (Dec 23, 2019):
I think so.It will be better with your development.
Actually I received a lot of email last weekend cause I followed and watched this project, you were solving problems anytime,anywhere...
@liyasthomas commented on GitHub (Dec 23, 2019):
Just shipped API documentation feature 😄
@jackflyer commented on GitHub (Mar 24, 2020):
Is there any option to set withCredentials from front side? or guide on where to set that option.
@liyasthomas commented on GitHub (Mar 24, 2020):
@jackflyer https://github.com/nuxt-community/axios-module/issues/168#issuecomment-471670927