hurl/integration/tests_ok/assert_header.html

20 lines
3.2 KiB
HTML
Raw Normal View History

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>
2022-11-11 16:25:00 +03:00
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP</span> <span class="number">200</span></span>
2021-09-21 07:36:53 +03:00
<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>
2023-04-11 18:28:28 +03:00
<span class="line"><span class="section-header">[Asserts]</span></span>
2021-09-21 07:36:53 +03:00
<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>
<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>
2023-01-31 22:00:55 +03:00
<span class="line"><span class="query-type">header</span> <span class="string">"Expires"</span> <span class="predicate-type">==</span> <span class="string">"Wed, 21 Oct 2015 07:28:00 GMT"</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Expires"</span> <span class="filter-type">toDate</span> <span class="string">"%a, %d %b %Y %H:%M:%S GMT"</span> <span class="filter-type">format</span> <span class="string">"%Y"</span> <span class="predicate-type">==</span> <span class="string">"2015"</span></span>
2023-03-17 23:13:33 +03:00
<span class="line"><span class="query-type">header</span> <span class="string">"Expires"</span> <span class="filter-type">toDate</span> <span class="string">"%a, %d %b %Y %H:%M:%S GMT"</span> <span class="filter-type">daysBeforeNow</span> <span class="predicate-type">&gt;</span> <span class="number">1000</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>
<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>