Skip to content

Cookies Question or bug #149

Answered by gavv
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Cookies() returns a list of cookies from Set-Cookie headers of current response.

httpexpect (actually, http.Client) does keep cookies from previous responses, but they are not available through Cookie() and Cookies() methods. The logic behind that is that these methods are response assertions, not session assertions, so they return response cookies, not session cookies.

Session cookies from previous responses are available through http.Client.Jar passed to httpexpect.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gavv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #149 on November 14, 2022 10:46.