hurl/integration/tests_ok/multilines.html
2022-11-18 00:20:53 +01:00

81 lines
5.3 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/multilines/plain-text</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 section-header">[Asserts]</span>
<span class="line"><span class="query-type">body</span> <span class="predicate-type">==</span> <span class="string">"line1\nline2\nline3\n"</span></span>
<span class="line"><span class="query-type">body</span> <span class="predicate-type">==</span> <span class="raw"><span class="line">```</span>
<span class="line">line1</span>
<span class="line">line2</span>
<span class="line">line3</span>
<span class="line">```</span></span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/multilines/base64</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="raw"><span class="line">```base64</span>
<span class="line">TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdCwg</span>
<span class="line">c2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWdu</span>
<span class="line">YSBhbGlxdWEuIFV0IGVuaW0gYWQgbWluaW0gdmVuaWFtLCBxdWlzIG5vc3RydWQgZXhlcmNpdGF0</span>
<span class="line">aW9uIHVsbGFtY28gbGFib3JpcyBuaXNpIHV0IGFsaXF1aXAgZXggZWEgY29tbW9kbyBjb25zZXF1</span>
<span class="line">YXQuIER1aXMgYXV0ZSBpcnVyZSBkb2xvciBpbiByZXByZWhlbmRlcml0IGluIHZvbHVwdGF0ZSB2</span>
<span class="line">ZWxpdCBlc3NlIGNpbGx1bSBkb2xvcmUgZXUgZnVnaWF0IG51bGxhIHBhcmlhdHVyLiBFeGNlcHRl</span>
<span class="line">dXIgc2ludCBvY2NhZWNhdCBjdXBpZGF0YXQgbm9uIHByb2lkZW50LCBzdW50IGluIGN1bHBhIHF1</span>
<span class="line">aSBvZmZpY2lhIGRlc2VydW50IG1vbGxpdCBhbmltIGlkIGVzdCBsYWJvcnVtLg==</span>
<span class="line">```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/multilines/hex</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="raw"><span class="line">```hex</span>
<span class="line">039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81</span>
<span class="line">```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/multilines/json</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="raw"><span class="line">```json</span>
<span class="line">{</span>
<span class="line"> "foo": "bar"</span>
<span class="line"> "baz": 123456</span>
<span class="line">}</span>
<span class="line">```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/multilines/xml</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="raw"><span class="line">```xml</span>
<span class="line">&lt;?xml version="1.0"?&gt;</span>
<span class="line">&lt;catalog&gt;</span>
<span class="line"> &lt;book id="bk101"&gt;</span>
<span class="line"> &lt;author&gt;Gambardella, Matthew&lt;/author&gt;</span>
<span class="line"> &lt;title&gt;XML Developer's Guide&lt;/title&gt;</span>
<span class="line"> &lt;genre&gt;Computer&lt;/genre&gt;</span>
<span class="line"> &lt;price&gt;44.95&lt;/price&gt;</span>
<span class="line"> &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt;</span>
<span class="line"> &lt;description&gt;An in-depth look at creating applications</span>
<span class="line"> with XML.&lt;/description&gt;</span>
<span class="line"> &lt;/book&gt;</span>
<span class="line">&lt;/catalog&gt;</span>
<span class="line">```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/multilines/graphql</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="raw"><span class="line">```graphql</span>
<span class="line">{</span>
<span class="line"> hero {</span>
<span class="line"> name</span>
<span class="line"> # Queries can have comments!</span>
<span class="line"> friends {</span>
<span class="line"> name</span>
<span class="line"> }</span>
<span class="line"> }</span>
<span class="line">}</span>
<span class="line">```</span></span>
</span></span></code></pre>