mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-27 16:26:40 +03:00
2 lines
3.6 KiB
HTML
2 lines
3.6 KiB
HTML
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">POST</span> <span class="url">http://localhost:8000/post-json</span></span></div><span class="line"></span><span class="line">{<span class="line"> "name": "Bob",</span><span class="line"> "password": "secret"</span><span class="line">}</span><div class="response"><span class="line"></span><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">POST</span> <span class="url">http://localhost:8000/post-json-array</span></span></div><span class="line">[1,2,3]<div class="response"><span class="line"></span><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">POST</span> <span class="url">http://localhost:8000/post-json-string</span></span></div><span class="line">"Hello"<div class="response"><span class="line"></span><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">POST</span> <span class="url">http://localhost:8000/post-json-number</span></span></div><span class="line">100<div class="response"><span class="line"></span><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">POST</span> <span class="url">http://localhost:8000/post-json-numbers</span></span></div><span class="line">{<span class="line"> "natural": 100,</span><span class="line"> "negative": -1,</span><span class="line"> "float": "3.333333333333333",</span><span class="line"> "exponent": 100e100</span><span class="line">}</span><div class="response"><span class="line"></span><span class="line"></span><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">POST</span> <span class="url">http://localhost:8000/post-json-boolean</span></span></div><span class="line">true<div class="response"><span class="line"></span><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">#</span></span><span class="line"><span class="comment"># Use variable in your input json</span></span><span class="line"><span class="comment">#</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/get-name</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">[Captures]</span></span><span class="line">name<span>:</span> <span class="query-type">status</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="method">POST</span> <span class="url">http://localhost:8000/post-json</span></span></div><span class="line"></span><span class="line">{<span class="line"> "name": "{{name}}",</span><span class="line"> "password": "secret"</span><span class="line">}</span></div></div>
|