mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-21 18:11:43 +03:00
20 lines
3.1 KiB
HTML
20 lines
3.1 KiB
HTML
<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>
|
|
<span class="line"><span class="version">HTTP</span> <span class="number">200</span></span>
|
|
<span class="line"><span class="string">Content-Type</span>: <span class="string">text/html; charset=utf-8</span></span>
|
|
<span class="line"><span class="string">Set-Cookie</span>: <span class="string">cookie1=value1; Path=/</span></span>
|
|
<span class="line"><span class="string">Set-Cookie</span>: <span class="string">cookie2=value2; 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">"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>
|
|
<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>
|
|
<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">></span> <span class="number">1000</span></span>
|
|
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="predicate-type">exists</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">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>
|