mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1383] Support for Cookies #453
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#453
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 @mulka on GitHub (Dec 13, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1383
Is your feature request related to a problem? Please describe.
I don't see a way to add cookies to requests. I'm using a session cookie to authenticate to an API, but I don't see a way to add a cookie to a request in Hoppscotch
Describe the solution you'd like
I'd like to have a place to put cookies so they can be sent with every request to an API in Hoppscotch
Describe alternatives you've considered
Use a different tool I guess.
Additional context
@AndrewBastin commented on GitHub (Dec 13, 2020):
Umm, we have thought about this.
But the problem we are facing is that since Hoppscotch runs on the browser, we are faced with limitations which are set on the platform. Browsers currently don't provide an API that lets us set cookies for requests for security reasons (we can set for the cookies in a document space ofc, but not for XHRs).
@mulka commented on GitHub (Dec 13, 2020):
Gotcha. I wonder how Postman does cookies
@AndrewBastin commented on GitHub (Dec 14, 2020):
Postman can take advantage of the fact that it is running natively (it is an Electron app) which allows it to use the native APIs which do provide cookie support.
@Leodau commented on GitHub (Feb 5, 2021):
You should close this issue, browsers would hopefully never be able to check HttpOnly cookies. 🙏
@fr3fou commented on GitHub (Mar 9, 2021):
But how would one test an API that uses cookies?
@hedior03 commented on GitHub (Jul 16, 2021):
Is this the reason why my API responses:
@b5l commented on GitHub (Sep 7, 2021):
Bump, since there is a Hoppscotch browser extension, shouldn't it be possible to let it solve our cookie issue?
@nelsontky commented on GitHub (Oct 4, 2021):
This is interesting! May I try implementing this? I will open a PR in the extension repository if this functionality is possible.
@liyasthomas commented on GitHub (Oct 4, 2021):
Hi @nelsontky, you're free to pick up this one. And yes - this is a tricky one to implement.
@nelsontky commented on GitHub (Oct 4, 2021):
Ok @liyasthomas I have opened a PR!
@vaaski commented on GitHub (May 3, 2022):
what happened to this?
@AndrewBastin commented on GitHub (May 3, 2022):
@vaaski With the merging of hoppscotch/hoppscotch-extension#88 we have merged the code for supporting cookies into the extension and it does sorta work as indicated and shown in the PR. We are actually working on having proper documentation and proper UX for Cookies which should be live in a couple of weeks.
@vaaski commented on GitHub (May 3, 2022):
thanks for the swift reply, i just noticed i already commented on https://github.com/hoppscotch/hoppscotch-extension/pull/88 so apparently i was aware of it in the past and forgot
@LMCom commented on GitHub (Jan 15, 2024):
I am currently using the standalone application in macOS. It does not seem to save the session cookie after login. This prevents me from being able to test most of my application.
@rishabmahesh commented on GitHub (Mar 4, 2024):
@LMCom Did you find a workaround? I'm also facing the same issue
@nelsontky commented on GitHub (Mar 4, 2024):
Was an old PR i wrote but if i remember correctly cookies will only work on the web version with the extension installed
@liyasthomas commented on GitHub (Mar 4, 2024):
Hoppscotch Desktop App supports cookies: https://docs.hoppscotch.io/documentation/features/cookies
@LMCom commented on GitHub (Mar 5, 2024):
I didn't find one.
Sounds good! But my understanding is that the cookies have to be created manually.
My use-case is a login. After posting the correct credentials, the application responds with a cookie that should keep me logged in. I whitelisted the domain via the cookie settings but no cookie is being created after login. Subsequent GET-requests just redirect me to the login page.
I tried copying the cookie string and setting it manually for the domain but it doesn't seem to have any effect.
@rishabmahesh commented on GitHub (Mar 5, 2024):
Yup, I have the exact same use case. The cookie doesn't get set automatically
@MexHigh commented on GitHub (May 26, 2024):
I don't see any option to set cookies in the web version even with the extension in use. The documentation also states that cookies are only supported on Desktop.
@liyasthomas Why is that? Since using the extension bypasses the XHR limitations, this should be possible, right?