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
Support for cookies? #26
Comments
Yes, you can specify cookies just like all the other headers:
(See also #13.) Is that what you mean? |
@jakubroztocil I'm wondering if cookies set by the server can be persisted across calls? Is this possible at all in httpie? So that for example I can use this to test session-based api calls... |
@mcnemesis Yes, there is a sessions feature that allows cookies as well as custom headers and auth to persist between requests. |
Awesome! Thanks @jakubroztocil |
@jakubroztocil Can we use json for setting cookies? |
@NightMachinary you can use a session file (https://httpie.org/docs#sessions): Using
|
I get an invalid JSON error with the above. it expects a colon and value as it is treating those cookies as a key |
@faaizajaz, please open a specific issue. |
@BoboTiG Happy to do so. Just wanted to confirm that if I have a session file containing only the block I shared above, should it work, or am I missing something about how sessions work? |
Is there support for cookies?
The underlying request lib seems to support cookies....
Cheers,
Govinda
The text was updated successfully, but these errors were encountered: