mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-22 02:21:36 +03:00
24 lines
3.5 KiB
HTML
24 lines
3.5 KiB
HTML
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|