2021-09-21 07:36:53 +03:00
|
|
|
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-header</span></span>
|
|
|
|
</span><span class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
|
|
|
|
<span class="line"><span class="string">Content-Type</span><span>:</span> <span class="string">text/html; charset=utf-8</span></span>
|
|
|
|
<span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">cookie1=value1; Path=/</span></span>
|
|
|
|
<span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">cookie2=value2; Path=/</span></span>
|
|
|
|
<span class="line section-header">[Asserts]</span>
|
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Custom"</span> <span class="not">not</span> <span class="predicate-type">exists</span></span>
|
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Content-Type"</span> <span class="predicate-type">exists</span></span>
|
2022-03-28 19:04:35 +03:00
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Header1"</span> <span class="predicate-type">==</span> <span class="string">"value1"</span></span>
|
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"ETag"</span> <span class="predicate-type">==</span> <span class="string">"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""</span></span>
|
2021-09-21 07:36:53 +03:00
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="predicate-type">exists</span></span>
|
2022-10-25 09:59:18 +03:00
|
|
|
<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>
|
2021-09-21 07:36:53 +03:00
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="predicate-type">includes</span> <span class="string">"cookie1=value1; Path=/"</span></span>
|
2022-10-24 12:37:11 +03:00
|
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="not">not</span> <span class="predicate-type">includes</span> <span class="string">"cookie4=value4; Path=/"</span></span>
|
|
|
|
</span></span></code></pre>
|