Hello!I'm pretty new to ContextAs a proof of concept, I wanted to bootstrap download hurl with a hurlfile. GET https://github.com/Orange-OpenSource/hurl/releases/latest
Accept: application/json
[Options]
location: true
HTTP 200
[Captures]
version: jsonpath "$.tag_name"
GET https://github.com/Orange-OpenSource/hurl/releases/download/{{version}}/hurl_{{version}}_amd64.deb
[Options]
location: true
output: hurl_{{version}}_amd64.debRunning this file with QuestionBasically, is it intended that the output is both the specified file and stdout? Other Discussions |
Replies: 1 comment 1 reply
|
Hi, It's good to have newcomers because we can see what's need to be improved, in the documentation and in the way we present Hurl. The intended way to behave for Hurl is: By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call. (see here). So, given this Hurl file: GET https://example.org/foo.txt
GET https://example.org/bar.txtAnd run like this: $ hurl sample.hurlHurl will output the content of You can save the output of the last response like this: $ hurl sample.hurl > out.txtOr $ hurl --output out.txt sample.hurlNote that we have a current bug for binary responses (see #2306): like curl, for binary responses, we should not output the last response to standard output. We have also a way to specify options on a particular request with GET https://example.org/foo.txt
[Options]
output: out1.txt
GET https://example.org/bar.txt
GET https://example.org/baz.txt
[Options]
output: out2.txtAnd run with this: $ hurl --no-output sample.hurlI've specified With Hurl 4.3.0 (not released yet), you can use # This will go on standard output
GET https://example.org/foo.txt
[Options]
output: -
GET https://example.org/bar.txt
GET https://example.org/baz.txt
[Options]
output: out2.txtI hope it's more clear! |
Hi,
It's good to have newcomers because we can see what's need to be improved, in the documentation and in the way we present Hurl.
The intended way to behave for Hurl is: By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call. (see here).
So, given this Hurl file:
And run like this:
Hurl will output the content of
bar.txton standard output. This is the designed (expected?) behavior. We've done this to be kind of like curl, and to get a unique response in workflows that require multiple steps.You can save the output of the last response like this: