hurl/integration/tests/cookies.html

2 lines
6.9 KiB
HTML
Raw Normal View History

<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="comment"># Request Cookie</span></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-request-cookie1-valueA</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">cookie1<span>:</span> valueA</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="comment"># The cookie is not added in the cookie storage</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-multiple-request-cookies</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">user1<span>:</span> Bob</span><span class="line">user2<span>:</span> Bill</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="comment"># Session Cookie</span></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-session-cookie2-valueA</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2"</span> <span class="predicate-type">equals</span> <span class="string">"valueA"</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-valueA</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB</span></span></div><span class="line section-header">[Cookies]</span></span><span class="line">cookie2<span>:</span> valueB</span><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/delete-cookie2</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2"</span> <span class="predicate-type">equals</span> <span class="string">""</span></span><span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2[Max-Age]"</span> <span class="predicate-type">equals</span> <span class="number">0</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session</span></span></div><div class="response"><span class="line"><span class="ve