Is it possible to chain a value from a response to the next request? This would be useful for testing.
My understand is that between the header and the body there has to be a new line[0], in the docs seems like it's skipped[1], does it affect functionality if skipped? or is it intentional?
Thanks!
[0]: https://www.lifewire.com/hypertext-transfer-protocol-817944 [1]: https://hurl.dev/index.html#also-an-http-test-tool
# Get home:
GET https://example.net
HTTP/1.1 200
[Captures]
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
# Do login!
POST https://example.net/login?user=toto&password=1234
X-CSRF-TOKEN: {{csrf_token}}
HTTP/1.1 302We have related issues: - https://github.com/Orange-OpenSource/hurl/issues/87 - https://github.com/Orange-OpenSource/hurl/issues/88
Running several Hurl files concurrently (and independently) is clear and we will probably add in the next few months.
Running requests concurrently in the same Hurl file will be more complicated. The Hurl language has to describe a clear semantic about it.
$ echo GET http://google.com | hurl
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
Hurl allows running HTTP requests defined in a plain text format. It can be used to fetch data, or play a scenario (sequence of requests), asserting responses along the way. With its textual format, it is aimed for both devops and developers. With its command-line usage/simple unique binary, it is aimed for both local dev and continuous integration.
An Hurl sample:
Since our first "Show HN" submission [1], we have made the following changes:- full native support on Windows
- improve Hurl file format syntax (with md5, sha1, sha256 asserts for instance)
- add a tutorial on how to use Hurl [2]
- add a simple interactive mode
- a lot of bug fixes!
In our roadmap, we want to have a better support for package manager (brew, apt etc...), better error feedbacks.
We're looking for contributions on improving/correcting our documentation, build an UI client above Hurl, better IDE tooling integration.
And last but not least, we would be happy to have feeback on it!
[1] https://news.ycombinator.com/item?id=25655737
[2] https://hurl.dev/docs/tutorial/your-first-hurl-file.html