2023-04-20 19:31:11 +03:00
< pre > < code class = "language-hurl" > < span class = "hurl-entry" > < span class = "request" > < span class = "line" > < / span > < span class = "comment" > # We test the [`--cookie-jar`](https://hurl.dev/docs/manual.html#cookie-jar) option< / span >
< span class = "line" > < / span > < span class = "comment" > # that dumps the cookie storage to a file. Due to various support level among< / span >
< span class = "line" > < / span > < span class = "comment" > # libcurl implementation for cookie secure export, we limit this test to non secure cookie.< / span >
< span class = "line" > < / span >
< span class = "line" > < span class = "method" > GET< / span > < span class = "url" > http://localhost:8000/cookie-jar< / span > < / span >
< / span > < span class = "response" > < span class = "line" > < / span >
< span class = "line" > < span class = "version" > HTTP< / span > < span class = "number" > 200< / span > < / span >
< span class = "line" > < span class = "string" > Set-Cookie< / span > : < span class = "string" > LSID=DQAAAKEaem_vYg; Expires=Thu, 13 Jan 2078 22:23:01 GMT; HttpOnly; Path=/accounts< / span > < / span >
2023-05-02 09:43:38 +03:00
< span class = "line" > < span class = "string" > Set-Cookie< / span > : < span class = "string" > HSID=AYQEVnDKrdst; Domain=localhost; Expires=Thu, 13 Jan 2078 22:23:01 GMT; HttpOnly; Path=/< / span > < / span >
< span class = "line" > < span class = "string" > Set-Cookie< / span > : < span class = "string" > SSID=Ap4PGTEq; Domain=localhost; Expires=Thu, 13 Jan 2078 22:23:01 GMT; HttpOnly; Path=/< / span > < / span >
2023-04-20 19:31:11 +03:00
< span class = "line" > < span class = "section-header" > [Asserts]< / span > < / span >
< span class = "line" > < span class = "query-type" > header< / span > < span class = "string" > "Set-Cookie"< / span > < span class = "filter-type" > count< / span > < span class = "predicate-type" > ==< / span > < span class = "number" > 3< / span > < / span >
2023-06-01 10:24:52 +03:00
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID"< / span > < span class = "predicate-type" > ==< / span > < span class = "string" > "DQAAAKEaem_vYg"< / span > < / span >
2023-04-20 19:31:11 +03:00
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Value]"< / span > < span class = "predicate-type" > ==< / span > < span class = "string" > "DQAAAKEaem_vYg"< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Expires]"< / span > < span class = "predicate-type" > exists< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Expires]"< / span > < span class = "filter-type" > format< / span > < span class = "string" > "%a, %d %b %Y %H:%M:%S"< / span > < span class = "predicate-type" > ==< / span > < span class = "string" > "Thu, 13 Jan 2078 22:23:01"< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Max-Age]"< / span > < span class = "not" > not< / span > < span class = "predicate-type" > exists< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Domain]"< / span > < span class = "not" > not< / span > < span class = "predicate-type" > exists< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Path]"< / span > < span class = "predicate-type" > ==< / span > < span class = "string" > "/accounts"< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[Secure]"< / span > < span class = "not" > not< / span > < span class = "predicate-type" > exists< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[HttpOnly]"< / span > < span class = "predicate-type" > exists< / span > < / span >
< span class = "line" > < span class = "query-type" > cookie< / span > < span class = "string" > "LSID[SameSite]"< / span > < span class = "not" > not< / span > < span class = "predicate-type" > exists< / span > < / span >
< / span > < / span > < / code > < / pre >