mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-11 05:35:53 +03:00
Update man and README.
This commit is contained in:
parent
2a002f81a6
commit
08fc128a9b
59
README.md
59
README.md
@ -604,7 +604,7 @@ Hurl is very versatile, it enables to chain HTTP requests, capture values from H
|
||||
$ hurl session.hurl
|
||||
```
|
||||
|
||||
If no input-files are specified, input is read from stdin.
|
||||
If no input files are specified, input is read from stdin.
|
||||
|
||||
```
|
||||
$ echo GET http://httpbin.org/get | hurl
|
||||
@ -624,7 +624,7 @@ $ echo GET http://httpbin.org/get | hurl
|
||||
```
|
||||
|
||||
|
||||
Output goes to stdout by default. For output to a file, use the -o option:
|
||||
Output goes to stdout by default. For output to a file, use the [`-o, --output`](#output) option:
|
||||
|
||||
```
|
||||
$ hurl -o output input.hurl
|
||||
@ -632,7 +632,7 @@ $ hurl -o output input.hurl
|
||||
|
||||
By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call.
|
||||
|
||||
To have a test oriented output, you can use --test option:
|
||||
To have a test oriented output, you can use [`--test`](#test) option:
|
||||
|
||||
```
|
||||
$ hurl --test *.hurl
|
||||
@ -641,7 +641,7 @@ $ hurl --test *.hurl
|
||||
|
||||
## Hurl File Format
|
||||
|
||||
The Hurl file format is fully documented in <https://hurl.dev/docs/hurl-file.html>
|
||||
The Hurl file format is fully documented in [https://hurl.dev/docs/hurl-file.html](https://hurl.dev/docs/hurl-file.html)
|
||||
|
||||
It consists of one or several HTTP requests
|
||||
|
||||
@ -669,7 +669,7 @@ POST https://example.org/login?user=toto&password=1234
|
||||
X-CSRF-TOKEN: {{csrf_token}}
|
||||
```
|
||||
|
||||
More information on captures here <https://hurl.dev/docs/capturing-response.html>
|
||||
More information on captures here [https://hurl.dev/docs/capturing-response.html](https://hurl.dev/docs/capturing-response.html)
|
||||
|
||||
### Asserts
|
||||
|
||||
@ -701,23 +701,45 @@ xpath "string(//title)" == "301 Moved"
|
||||
|
||||
Thanks to asserts, Hurl can be used as a testing tool to run scenarii.
|
||||
|
||||
More information on asserts here <https://hurl.dev/docs/asserting-response.html>
|
||||
More information on asserts here [https://hurl.dev/docs/asserting-response.html](https://hurl.dev/docs/asserting-response.html)
|
||||
|
||||
## Options
|
||||
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
|
||||
For instance:
|
||||
|
||||
```
|
||||
$ hurl --location foo.hurl
|
||||
```
|
||||
|
||||
will follow redirection for each entry in `foo.hurl`. You can also define option only for a particular entry with an `[Options]` section. For instance, this Hurl file:
|
||||
|
||||
```hurl
|
||||
GET https://google.com
|
||||
HTTP/* 301
|
||||
|
||||
GET https://google.com
|
||||
[Options]
|
||||
location: true
|
||||
HTTP/* 200
|
||||
```
|
||||
|
||||
will follow redirection only for the second entry.
|
||||
|
||||
Option | Description
|
||||
--- | ---
|
||||
<a href="#cacert" id="cacert"><code>--cacert</code></a> | Tells curl to use the specified certificate file to verify the peer.<br/>The file may contain multiple CA certificates.<br/>The certificate(s) must be in PEM format.<br/>Normally curl is built to use a default file for this, so this option is typically used to alter that default file.<br/>
|
||||
<a href="#color" id="color"><code>--color</code></a> | Colorize Output<br/>
|
||||
<a href="#compressed" id="compressed"><code>--compressed</code></a> | Request a compressed response using one of the algorithms br, gzip, deflate and automatically decompress the content.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [-m, --max-time](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [-c, --cookie-jar](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [-b, --cookie](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [`-m, --max-time`](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [`-c, --cookie-jar`](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [`-b, --cookie`](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#fail-at-end" id="fail-at-end"><code>--fail-at-end</code></a> | Continue executing requests to the end of the Hurl file even when an assert error occurs.<br/>By default, Hurl exits after an assert error in the HTTP response.<br/><br/>Note that this option does not affect the behavior with multiple input Hurl files.<br/><br/>All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.<br/>
|
||||
<a href="#file-root" id="file-root"><code>--file-root <dir></code></a> | Set root filesystem to import files in Hurl. This is used for both files in multipart form data and request body.<br/>When this is not explicitly defined, the files are relative to the current directory in which Hurl is running.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [--max-redirs](#max-redirs) option.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [`--max-redirs`](#max-redirs) option.<br/>
|
||||
<a href="#glob" id="glob"><code>--glob <glob></code></a> | Specify input files that match the given glob pattern.<br/><br/>Multiple glob flags may be used. This flag supports common Unix glob patterns like *, ? and []. <br/>However, to avoid your shell accidentally expanding glob patterns before Hurl handles them, you must use single quotes or double quotes around each pattern.<br/>
|
||||
<a href="#include" id="include"><code>-i, --include</code></a> | Include the HTTP headers in the output (last entry).<br/>
|
||||
<a href="#ignore-asserts" id="ignore-asserts"><code>--ignore-asserts</code></a> | Ignore all asserts defined in the Hurl file.<br/>
|
||||
@ -725,8 +747,8 @@ Option | Description
|
||||
<a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br/>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br/>
|
||||
<a href="#json" id="json"><code>--json</code></a> | Output each hurl file result to JSON. The format is very closed to HAR format. <br/>
|
||||
<a href="#max-redirs" id="max-redirs"><code>--max-redirs <num></code></a> | Set maximum number of redirection-followings allowed<br/>By default, the limit is set to 50 redirections. Set this option to -1 to make it unlimited.<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [--connect-timeout](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize Output<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [`--connect-timeout`](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize output<br/>
|
||||
<a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br/>
|
||||
<a href="#noproxy" id="noproxy"><code>--noproxy <no-proxy-list></code></a> | Comma-separated list of hosts which do not use a proxy.<br/>Override value from Environment variable no_proxy.<br/>
|
||||
<a href="#output" id="output"><code>-o, --output <file></code></a> | Write output to <file> instead of stdout.<br/>
|
||||
@ -735,12 +757,12 @@ Option | Description
|
||||
<a href="#report-junit" id="report-junit"><code>--report-junit <file></code></a> | Generate JUNIT <file>.<br/><br/>If the <file> report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#report-html" id="report-html"><code>--report-html <dir></code></a> | Generate HTML report in dir.<br/><br/>If the HTML report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#summary" id="summary"><code>--summary</code></a> | Print test metrics at the end of the run (on stderr)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [--no-output](#no-output) [--progress](#progress) [--summary](#summary)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [`--no-output`](#no-output) [`--progress`](#progress) [`--summary`](#summary)<br/>
|
||||
<a href="#to-entry" id="to-entry"><code>--to-entry <entry-number></code></a> | Execute Hurl file to ENTRY_NUMBER (starting at 1).<br/>Ignore the remaining of the file. It is useful for debugging a session.<br/>
|
||||
<a href="#user" id="user"><code>-u, --user <user:password></code></a> | Add basic Authentication header to each request.<br/>
|
||||
<a href="#user-agent" id="user-agent"><code>-A, --user-agent <name></code></a> | Specify the User-Agent string to send to the HTTP server.<br/>
|
||||
<a href="#variable" id="variable"><code>--variable <name=value></code></a> | Define variable (name/value) to be used in Hurl templates.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [--variable](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [`--variable`](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#verbose" id="verbose"><code>-v, --verbose</code></a> | Turn on verbose output on standard error stream<br/>Useful for debugging.<br/><br/>A line starting with '>' means data sent by Hurl.<br/>A line staring with '<' means data received by Hurl.<br/>A line starting with '*' means additional info provided by Hurl.<br/><br/>If you only want HTTP headers in the output, -i, --include might be the option you're looking for.<br/>
|
||||
<a href="#help" id="help"><code>-h, --help</code></a> | Usage help. This lists all current command line options with a short description.<br/>
|
||||
<a href="#version" id="version"><code>-V, --version</code></a> | Prints version information<br/>
|
||||
@ -749,15 +771,16 @@ Option | Description
|
||||
|
||||
Environment variables can only be specified in lowercase.
|
||||
|
||||
Using an environment variable to set the proxy has the same effect as using the [-x, --proxy](#proxy) option.
|
||||
Using an environment variable to set the proxy has the same effect as using the [`-x, --proxy`](#proxy) option.
|
||||
|
||||
Variable | Description
|
||||
--- | ---
|
||||
`http_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTP.<br/>
|
||||
`https_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTPS.<br/>
|
||||
`all_proxy [protocol://]<host>[:port]` | Sets the proxy server to use if no protocol-specific proxy is set.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | list of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [--variable](#variable) and [--variables-file](#variables-file) options.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | List of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [`--variable`](#variable) and [`--variables-file`](#variables-file) options.<br/>
|
||||
`NO_COLOR` | When set to a non-empty string, do not colorize output (see [`--no-color`](#no-color) option).<br/>
|
||||
|
||||
## Exit Codes
|
||||
|
||||
|
@ -29,10 +29,9 @@ def main(dest: str) -> int:
|
||||
<br/>
|
||||
|
||||
[![deploy status](https://github.com/Orange-OpenSource/hurl/workflows/CI/badge.svg)](https://github.com/Orange-OpenSource/hurl/actions)
|
||||
[![CircleCI](https://circleci.com/gh/lepapareil/hurl/tree/master.svg?style=shield)](https://circleci.com/gh/lepapareil/hurl/tree/master)
|
||||
[![coverage](https://Orange-OpenSource.github.io/hurl/coverage/badges/flat.svg)](https://Orange-OpenSource.github.io/hurl/coverage)
|
||||
[![Crates.io](https://img.shields.io/crates/v/hurl.svg)](https://crates.io/crates/hurl)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-informational)](https://hurl.dev)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-orange)](https://hurl.dev)
|
||||
|
||||
"""
|
||||
)
|
||||
@ -44,10 +43,9 @@ def main(dest: str) -> int:
|
||||
<br/>
|
||||
|
||||
[![deploy status](https://github.com/Orange-OpenSource/hurl/workflows/CI/badge.svg)](https://github.com/Orange-OpenSource/hurl/actions)
|
||||
[![CircleCI](https://circleci.com/gh/lepapareil/hurl/tree/master.svg?style=shield)](https://circleci.com/gh/lepapareil/hurl/tree/master)
|
||||
[![coverage](https://Orange-OpenSource.github.io/hurl/coverage/badges/flat.svg)](https://Orange-OpenSource.github.io/hurl/coverage)
|
||||
[![Crates.io](https://img.shields.io/crates/v/hurl.svg)](https://crates.io/crates/hurl)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-informational)](https://hurl.dev)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-orange)](https://hurl.dev)
|
||||
|
||||
"""
|
||||
)
|
||||
|
@ -1,4 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build Hurl Man File.
|
||||
|
||||
This script creates Hurl man file from a Markdown source.
|
||||
|
||||
This tool takes the Hurl man Markdown source file as a first argument.
|
||||
|
||||
Examples:
|
||||
$ python3 bin/release/gen_manpage.py docs/man/hurl.md > ../../docs/man-page.md
|
||||
|
||||
"""
|
||||
import sys
|
||||
import re
|
||||
from datetime import date
|
||||
@ -51,7 +61,7 @@ def convert_md(s):
|
||||
s = p.sub(".B \\1\n", s)
|
||||
|
||||
# Remove link Text
|
||||
p = re.compile("\[(.*)\]\(.*\)")
|
||||
p = re.compile("\[`?(.*?)`?\]\(.*?\)")
|
||||
s = p.sub("\\\\fI\\1\\\\fP", s)
|
||||
|
||||
# Remove local anchor
|
||||
|
39
docs/README.md
Normal file
39
docs/README.md
Normal file
@ -0,0 +1,39 @@
|
||||
# Hurl Documentation
|
||||
|
||||
This directory is the canonical source for Hurl documentation. The site <https://hurl.dev>, powered by Jekyll,
|
||||
is generated from it. If you want to make modifications to <https://hurl.dev>, you can make a PR
|
||||
in this repo.
|
||||
|
||||
## Man Page
|
||||
|
||||
The canonical source for the Hurl man pages is at <https://github.com/Orange-OpenSource/hurl/tree/master/docs/man>.
|
||||
The markdown files [`hurl.md`] and [`hurlfmt.md`] are used :
|
||||
|
||||
- to generate man pages [`hurl.1`] and [`hurlfmt.1`]
|
||||
- to generate Markdown documentation page [`man-page.md`] for <https://hurl.dev>
|
||||
|
||||
```
|
||||
docs/man/hurl.md => docs/man/hurl.1
|
||||
docs/man/hurl.md => docs/man-page.md
|
||||
|
||||
docs/man/hurlfmt.md => docs/man/hurlfmt.1
|
||||
```
|
||||
|
||||
## READMEs
|
||||
|
||||
[GitHub README] and [crates.io README] are generated from the canonical docs.
|
||||
|
||||
```
|
||||
docs/*.md => README.md
|
||||
docs/*.md => packages/hurl/README.md
|
||||
```
|
||||
|
||||
|
||||
[`hurl.md`]: https://github.com/Orange-OpenSource/hurl/tree/master/docs/man/hurl.md
|
||||
[`hurlfmt.md`]: https://github.com/Orange-OpenSource/hurl/tree/master/docs/man/hurlfmt.md
|
||||
[`hurl.1`]: https://github.com/Orange-OpenSource/hurl/tree/master/docs/man/hurl.1
|
||||
[`hurlfmt.1`]: https://github.com/Orange-OpenSource/hurl/tree/master/docs/man/hurlfmt.1
|
||||
[`man-page.md`]: https://github.com/Orange-OpenSource/hurl/blob/master/docs/man-page.md
|
||||
[GitHub README]: https://github.com/Orange-OpenSource/hurl/blob/master/README.md
|
||||
[crates.io README]: https://github.com/Orange-OpenSource/hurl/blob/master/packages/hurl/README.md
|
||||
|
@ -20,7 +20,7 @@ Hurl is very versatile, it enables to chain HTTP requests, capture values from H
|
||||
$ hurl session.hurl
|
||||
```
|
||||
|
||||
If no input-files are specified, input is read from stdin.
|
||||
If no input files are specified, input is read from stdin.
|
||||
|
||||
```
|
||||
$ echo GET http://httpbin.org/get | hurl
|
||||
@ -40,7 +40,7 @@ $ echo GET http://httpbin.org/get | hurl
|
||||
```
|
||||
|
||||
|
||||
Output goes to stdout by default. For output to a file, use the -o option:
|
||||
Output goes to stdout by default. For output to a file, use the [`-o, --output`](#output) option:
|
||||
|
||||
```
|
||||
$ hurl -o output input.hurl
|
||||
@ -48,7 +48,7 @@ $ hurl -o output input.hurl
|
||||
|
||||
By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call.
|
||||
|
||||
To have a test oriented output, you can use --test option:
|
||||
To have a test oriented output, you can use [`--test`](#test) option:
|
||||
|
||||
```
|
||||
$ hurl --test *.hurl
|
||||
@ -57,7 +57,7 @@ $ hurl --test *.hurl
|
||||
|
||||
## Hurl File Format
|
||||
|
||||
The Hurl file format is fully documented in <https://hurl.dev/docs/hurl-file.html>
|
||||
The Hurl file format is fully documented in [https://hurl.dev/docs/hurl-file.html](https://hurl.dev/docs/hurl-file.html)
|
||||
|
||||
It consists of one or several HTTP requests
|
||||
|
||||
@ -85,7 +85,7 @@ POST https://example.org/login?user=toto&password=1234
|
||||
X-CSRF-TOKEN: {{csrf_token}}
|
||||
```
|
||||
|
||||
More information on captures here <https://hurl.dev/docs/capturing-response.html>
|
||||
More information on captures here [https://hurl.dev/docs/capturing-response.html](https://hurl.dev/docs/capturing-response.html)
|
||||
|
||||
### Asserts
|
||||
|
||||
@ -117,23 +117,45 @@ xpath "string(//title)" == "301 Moved"
|
||||
|
||||
Thanks to asserts, Hurl can be used as a testing tool to run scenarii.
|
||||
|
||||
More information on asserts here <https://hurl.dev/docs/asserting-response.html>
|
||||
More information on asserts here [https://hurl.dev/docs/asserting-response.html](https://hurl.dev/docs/asserting-response.html)
|
||||
|
||||
## Options
|
||||
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
|
||||
For instance:
|
||||
|
||||
```
|
||||
$ hurl --location foo.hurl
|
||||
```
|
||||
|
||||
will follow redirection for each entry in `foo.hurl`. You can also define option only for a particular entry with an `[Options]` section. For instance, this Hurl file:
|
||||
|
||||
```hurl
|
||||
GET https://google.com
|
||||
HTTP/* 301
|
||||
|
||||
GET https://google.com
|
||||
[Options]
|
||||
location: true
|
||||
HTTP/* 200
|
||||
```
|
||||
|
||||
will follow redirection only for the second entry.
|
||||
|
||||
Option | Description
|
||||
--- | ---
|
||||
<a href="#cacert" id="cacert"><code>--cacert</code></a> | Tells curl to use the specified certificate file to verify the peer.<br/>The file may contain multiple CA certificates.<br/>The certificate(s) must be in PEM format.<br/>Normally curl is built to use a default file for this, so this option is typically used to alter that default file.<br/>
|
||||
<a href="#color" id="color"><code>--color</code></a> | Colorize Output<br/>
|
||||
<a href="#compressed" id="compressed"><code>--compressed</code></a> | Request a compressed response using one of the algorithms br, gzip, deflate and automatically decompress the content.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [-m, --max-time](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [-c, --cookie-jar](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [-b, --cookie](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [`-m, --max-time`](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [`-c, --cookie-jar`](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [`-b, --cookie`](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#fail-at-end" id="fail-at-end"><code>--fail-at-end</code></a> | Continue executing requests to the end of the Hurl file even when an assert error occurs.<br/>By default, Hurl exits after an assert error in the HTTP response.<br/><br/>Note that this option does not affect the behavior with multiple input Hurl files.<br/><br/>All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.<br/>
|
||||
<a href="#file-root" id="file-root"><code>--file-root <dir></code></a> | Set root filesystem to import files in Hurl. This is used for both files in multipart form data and request body.<br/>When this is not explicitly defined, the files are relative to the current directory in which Hurl is running.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [--max-redirs](#max-redirs) option.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [`--max-redirs`](#max-redirs) option.<br/>
|
||||
<a href="#glob" id="glob"><code>--glob <glob></code></a> | Specify input files that match the given glob pattern.<br/><br/>Multiple glob flags may be used. This flag supports common Unix glob patterns like *, ? and []. <br/>However, to avoid your shell accidentally expanding glob patterns before Hurl handles them, you must use single quotes or double quotes around each pattern.<br/>
|
||||
<a href="#include" id="include"><code>-i, --include</code></a> | Include the HTTP headers in the output (last entry).<br/>
|
||||
<a href="#ignore-asserts" id="ignore-asserts"><code>--ignore-asserts</code></a> | Ignore all asserts defined in the Hurl file.<br/>
|
||||
@ -141,8 +163,8 @@ Option | Description
|
||||
<a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br/>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br/>
|
||||
<a href="#json" id="json"><code>--json</code></a> | Output each hurl file result to JSON. The format is very closed to HAR format. <br/>
|
||||
<a href="#max-redirs" id="max-redirs"><code>--max-redirs <num></code></a> | Set maximum number of redirection-followings allowed<br/>By default, the limit is set to 50 redirections. Set this option to -1 to make it unlimited.<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [--connect-timeout](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize Output<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [`--connect-timeout`](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize output<br/>
|
||||
<a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br/>
|
||||
<a href="#noproxy" id="noproxy"><code>--noproxy <no-proxy-list></code></a> | Comma-separated list of hosts which do not use a proxy.<br/>Override value from Environment variable no_proxy.<br/>
|
||||
<a href="#output" id="output"><code>-o, --output <file></code></a> | Write output to <file> instead of stdout.<br/>
|
||||
@ -151,12 +173,12 @@ Option | Description
|
||||
<a href="#report-junit" id="report-junit"><code>--report-junit <file></code></a> | Generate JUNIT <file>.<br/><br/>If the <file> report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#report-html" id="report-html"><code>--report-html <dir></code></a> | Generate HTML report in dir.<br/><br/>If the HTML report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#summary" id="summary"><code>--summary</code></a> | Print test metrics at the end of the run (on stderr)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [--no-output](#no-output) [--progress](#progress) [--summary](#summary)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [`--no-output`](#no-output) [`--progress`](#progress) [`--summary`](#summary)<br/>
|
||||
<a href="#to-entry" id="to-entry"><code>--to-entry <entry-number></code></a> | Execute Hurl file to ENTRY_NUMBER (starting at 1).<br/>Ignore the remaining of the file. It is useful for debugging a session.<br/>
|
||||
<a href="#user" id="user"><code>-u, --user <user:password></code></a> | Add basic Authentication header to each request.<br/>
|
||||
<a href="#user-agent" id="user-agent"><code>-A, --user-agent <name></code></a> | Specify the User-Agent string to send to the HTTP server.<br/>
|
||||
<a href="#variable" id="variable"><code>--variable <name=value></code></a> | Define variable (name/value) to be used in Hurl templates.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [--variable](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [`--variable`](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#verbose" id="verbose"><code>-v, --verbose</code></a> | Turn on verbose output on standard error stream<br/>Useful for debugging.<br/><br/>A line starting with '>' means data sent by Hurl.<br/>A line staring with '<' means data received by Hurl.<br/>A line starting with '*' means additional info provided by Hurl.<br/><br/>If you only want HTTP headers in the output, -i, --include might be the option you're looking for.<br/>
|
||||
<a href="#help" id="help"><code>-h, --help</code></a> | Usage help. This lists all current command line options with a short description.<br/>
|
||||
<a href="#version" id="version"><code>-V, --version</code></a> | Prints version information<br/>
|
||||
@ -165,15 +187,16 @@ Option | Description
|
||||
|
||||
Environment variables can only be specified in lowercase.
|
||||
|
||||
Using an environment variable to set the proxy has the same effect as using the [-x, --proxy](#proxy) option.
|
||||
Using an environment variable to set the proxy has the same effect as using the [`-x, --proxy`](#proxy) option.
|
||||
|
||||
Variable | Description
|
||||
--- | ---
|
||||
`http_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTP.<br/>
|
||||
`https_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTPS.<br/>
|
||||
`all_proxy [protocol://]<host>[:port]` | Sets the proxy server to use if no protocol-specific proxy is set.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | list of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [--variable](#variable) and [--variables-file](#variables-file) options.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | List of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [`--variable`](#variable) and [`--variables-file`](#variables-file) options.<br/>
|
||||
`NO_COLOR` | When set to a non-empty string, do not colorize output (see [`--no-color`](#no-color) option).<br/>
|
||||
|
||||
## Exit Codes
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH hurl 1 "23 Jun 2022" "hurl 1.7.0-snapshot" " Hurl Manual"
|
||||
.TH hurl 1 "16 Aug 2022" "hurl 1.7.0-snapshot" " Hurl Manual"
|
||||
.SH NAME
|
||||
|
||||
hurl - run and test HTTP requests.
|
||||
@ -19,7 +19,7 @@ Hurl is very versatile, it enables to chain HTTP requests, capture values from H
|
||||
|
||||
$ hurl session.hurl
|
||||
|
||||
If no input-files are specified, input is read from stdin.
|
||||
If no input files are specified, input is read from stdin.
|
||||
|
||||
$ echo GET http://httpbin.org/get | hurl
|
||||
{
|
||||
@ -37,20 +37,20 @@ If no input-files are specified, input is read from stdin.
|
||||
}
|
||||
|
||||
|
||||
Output goes to stdout by default. For output to a file, use the -o option:
|
||||
Output goes to stdout by default. For output to a file, use the \fI-o, --output\fP option:
|
||||
|
||||
$ hurl -o output input.hurl
|
||||
|
||||
By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call.
|
||||
|
||||
To have a test oriented output, you can use --test option:
|
||||
To have a test oriented output, you can use \fI--test\fP option:
|
||||
|
||||
$ hurl --test *.hurl
|
||||
|
||||
|
||||
.SH HURL FILE FORMAT
|
||||
|
||||
The Hurl file format is fully documented in <https://hurl.dev/docs/hurl-file.html>
|
||||
The Hurl file format is fully documented in \fIhttps://hurl.dev/docs/hurl-file.html\fP
|
||||
|
||||
It consists of one or several HTTP requests
|
||||
|
||||
@ -74,7 +74,7 @@ A typical example occurs with csrf tokens.
|
||||
POST https://example.org/login?user=toto&password=1234
|
||||
X-CSRF-TOKEN: {{csrf_token}}
|
||||
|
||||
More information on captures here <https://hurl.dev/docs/capturing-response.html>
|
||||
More information on captures here \fIhttps://hurl.dev/docs/capturing-response.html\fP
|
||||
|
||||
.IP "Asserts"
|
||||
|
||||
@ -100,11 +100,29 @@ You can also include explicit asserts combining query and predicate
|
||||
|
||||
Thanks to asserts, Hurl can be used as a testing tool to run scenarii.
|
||||
|
||||
More information on asserts here <https://hurl.dev/docs/asserting-response.html>
|
||||
More information on asserts here \fIhttps://hurl.dev/docs/asserting-response.html\fP
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
|
||||
For instance:
|
||||
|
||||
$ hurl --location foo.hurl
|
||||
|
||||
will follow redirection for each entry in `foo.hurl`. You can also define option only for a particular entry with an `[Options]` section. For instance, this Hurl file:
|
||||
|
||||
GET https://google.com
|
||||
HTTP/* 301
|
||||
|
||||
GET https://google.com
|
||||
[Options]
|
||||
location: true
|
||||
HTTP/* 200
|
||||
|
||||
will follow redirection only for the second entry.
|
||||
|
||||
.IP "--cacert "
|
||||
|
||||
@ -199,7 +217,7 @@ See also \fI--connect-timeout\fP option.
|
||||
|
||||
.IP "--no-color "
|
||||
|
||||
Do not colorize Output
|
||||
Do not colorize output
|
||||
|
||||
.IP "--no-output "
|
||||
|
||||
@ -240,7 +258,7 @@ Print test metrics at the end of the run (on stderr)
|
||||
|
||||
.IP "--test "
|
||||
|
||||
Activate test mode; equals \fI--no-output](#no-output) [--progress](#progress) [--summary\fP
|
||||
Activate test mode; equals \fI--no-output\fP \fI--progress\fP \fI--summary\fP
|
||||
|
||||
.IP "--to-entry <entry-number> "
|
||||
|
||||
@ -306,11 +324,15 @@ Sets the proxy server to use if no protocol-specific proxy is set.
|
||||
|
||||
.IP "no_proxy <comma-separated list of hosts>"
|
||||
|
||||
list of host names that shouldn't go through any proxy.
|
||||
List of host names that shouldn't go through any proxy.
|
||||
|
||||
.IP "HURL_name value"
|
||||
|
||||
Define variable (name/value) to be used in Hurl templates. This is similar than \fI--variable](#variable) and [--variables-file\fP options.
|
||||
Define variable (name/value) to be used in Hurl templates. This is similar than \fI--variable\fP and \fI--variables-file\fP options.
|
||||
|
||||
.IP "NO_COLOR"
|
||||
|
||||
When set to a non-empty string, do not colorize output (see \fI--no-color\fP option).
|
||||
|
||||
.SH EXIT CODES
|
||||
|
||||
|
@ -18,7 +18,7 @@ Hurl is very versatile, it enables to chain HTTP requests, capture values from H
|
||||
$ hurl session.hurl
|
||||
```
|
||||
|
||||
If no input-files are specified, input is read from stdin.
|
||||
If no input files are specified, input is read from stdin.
|
||||
|
||||
```
|
||||
$ echo GET http://httpbin.org/get | hurl
|
||||
@ -38,7 +38,7 @@ $ echo GET http://httpbin.org/get | hurl
|
||||
```
|
||||
|
||||
|
||||
Output goes to stdout by default. For output to a file, use the -o option:
|
||||
Output goes to stdout by default. For output to a file, use the [`-o, --output`](#output) option:
|
||||
|
||||
```
|
||||
$ hurl -o output input.hurl
|
||||
@ -46,7 +46,7 @@ $ hurl -o output input.hurl
|
||||
|
||||
By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call.
|
||||
|
||||
To have a test oriented output, you can use --test option:
|
||||
To have a test oriented output, you can use [`--test`](#test) option:
|
||||
|
||||
```
|
||||
$ hurl --test *.hurl
|
||||
@ -55,7 +55,7 @@ $ hurl --test *.hurl
|
||||
|
||||
## HURL FILE FORMAT
|
||||
|
||||
The Hurl file format is fully documented in <https://hurl.dev/docs/hurl-file.html>
|
||||
The Hurl file format is fully documented in [https://hurl.dev/docs/hurl-file.html](https://hurl.dev/docs/hurl-file.html)
|
||||
|
||||
It consists of one or several HTTP requests
|
||||
|
||||
@ -83,7 +83,7 @@ POST https://example.org/login?user=toto&password=1234
|
||||
X-CSRF-TOKEN: {{csrf_token}}
|
||||
```
|
||||
|
||||
More information on captures here <https://hurl.dev/docs/capturing-response.html>
|
||||
More information on captures here [https://hurl.dev/docs/capturing-response.html](https://hurl.dev/docs/capturing-response.html)
|
||||
|
||||
### Asserts
|
||||
|
||||
@ -115,11 +115,33 @@ xpath "string(//title)" == "301 Moved"
|
||||
|
||||
Thanks to asserts, Hurl can be used as a testing tool to run scenarii.
|
||||
|
||||
More information on asserts here <https://hurl.dev/docs/asserting-response.html>
|
||||
More information on asserts here [https://hurl.dev/docs/asserting-response.html](https://hurl.dev/docs/asserting-response.html)
|
||||
|
||||
## OPTIONS
|
||||
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
|
||||
For instance:
|
||||
|
||||
```
|
||||
$ hurl --location foo.hurl
|
||||
```
|
||||
|
||||
will follow redirection for each entry in `foo.hurl`. You can also define option only for a particular entry with an `[Options]` section. For instance, this Hurl file:
|
||||
|
||||
```hurl
|
||||
GET https://google.com
|
||||
HTTP/* 301
|
||||
|
||||
GET https://google.com
|
||||
[Options]
|
||||
location: true
|
||||
HTTP/* 200
|
||||
```
|
||||
|
||||
will follow redirection only for the second entry.
|
||||
|
||||
### --cacert {#cacert}
|
||||
|
||||
@ -140,20 +162,20 @@ Request a compressed response using one of the algorithms br, gzip, deflate and
|
||||
|
||||
Maximum time in seconds that you allow Hurl's connection to take.
|
||||
|
||||
See also [-m, --max-time](#max-time) option.
|
||||
See also [`-m, --max-time`](#max-time) option.
|
||||
|
||||
### -b, --cookie <file> {#cookie}
|
||||
|
||||
Read cookies from file (using the Netscape cookie file format).
|
||||
|
||||
Combined with [-c, --cookie-jar](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.
|
||||
Combined with [`-c, --cookie-jar`](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.
|
||||
|
||||
### -c, --cookie-jar <file> {#cookie-jar}
|
||||
|
||||
Write cookies to FILE after running the session (only for one session).
|
||||
The file will be written using the Netscape cookie file format.
|
||||
|
||||
Combined with [-b, --cookie](#cookie), you can simulate a cookie storage between successive Hurl runs.
|
||||
Combined with [`-b, --cookie`](#cookie), you can simulate a cookie storage between successive Hurl runs.
|
||||
|
||||
### --fail-at-end {#fail-at-end}
|
||||
|
||||
@ -171,7 +193,7 @@ When this is not explicitly defined, the files are relative to the current direc
|
||||
|
||||
### -L, --location {#location}
|
||||
|
||||
Follow redirect. You can limit the amount of redirects to follow by using the [--max-redirs](#max-redirs) option.
|
||||
Follow redirect. You can limit the amount of redirects to follow by using the [`--max-redirs`](#max-redirs) option.
|
||||
|
||||
### --glob <glob> {#glob}
|
||||
|
||||
@ -210,11 +232,11 @@ By default, the limit is set to 50 redirections. Set this option to -1 to make i
|
||||
|
||||
Maximum time in seconds that you allow a request/response to take. This is the standard timeout.
|
||||
|
||||
See also [--connect-timeout](#connect-timeout) option.
|
||||
See also [`--connect-timeout`](#connect-timeout) option.
|
||||
|
||||
### --no-color {#no-color}
|
||||
|
||||
Do not colorize Output
|
||||
Do not colorize output
|
||||
|
||||
### --no-output {#no-output}
|
||||
|
||||
@ -255,7 +277,7 @@ Print test metrics at the end of the run (on stderr)
|
||||
|
||||
### --test {#test}
|
||||
|
||||
Activate test mode; equals [--no-output](#no-output) [--progress](#progress) [--summary](#summary)
|
||||
Activate test mode; equals [`--no-output`](#no-output) [`--progress`](#progress) [`--summary`](#summary)
|
||||
|
||||
### --to-entry <entry-number> {#to-entry}
|
||||
|
||||
@ -278,7 +300,7 @@ Define variable (name/value) to be used in Hurl templates.
|
||||
|
||||
Set properties file in which your define your variables.
|
||||
|
||||
Each variable is defined as name=value exactly as with [--variable](#variable) option.
|
||||
Each variable is defined as name=value exactly as with [`--variable`](#variable) option.
|
||||
|
||||
Note that defining a variable twice produces an error.
|
||||
|
||||
@ -305,7 +327,7 @@ Prints version information
|
||||
|
||||
Environment variables can only be specified in lowercase.
|
||||
|
||||
Using an environment variable to set the proxy has the same effect as using the [-x, --proxy](#proxy) option.
|
||||
Using an environment variable to set the proxy has the same effect as using the [`-x, --proxy`](#proxy) option.
|
||||
|
||||
### http_proxy [protocol://]<host>[:port]
|
||||
|
||||
@ -321,11 +343,15 @@ Sets the proxy server to use if no protocol-specific proxy is set.
|
||||
|
||||
### no_proxy <comma-separated list of hosts>
|
||||
|
||||
list of host names that shouldn't go through any proxy.
|
||||
List of host names that shouldn't go through any proxy.
|
||||
|
||||
### HURL_name value
|
||||
|
||||
Define variable (name/value) to be used in Hurl templates. This is similar than [--variable](#variable) and [--variables-file](#variables-file) options.
|
||||
Define variable (name/value) to be used in Hurl templates. This is similar than [`--variable`](#variable) and [`--variables-file`](#variables-file) options.
|
||||
|
||||
### NO_COLOR
|
||||
|
||||
When set to a non-empty string, do not colorize output (see [`--no-color`](#no-color) option).
|
||||
|
||||
## EXIT CODES
|
||||
|
||||
|
@ -3,10 +3,9 @@
|
||||
<br/>
|
||||
|
||||
[![deploy status](https://github.com/Orange-OpenSource/hurl/workflows/CI/badge.svg)](https://github.com/Orange-OpenSource/hurl/actions)
|
||||
[![CircleCI](https://circleci.com/gh/lepapareil/hurl/tree/master.svg?style=shield)](https://circleci.com/gh/lepapareil/hurl/tree/master)
|
||||
[![coverage](https://Orange-OpenSource.github.io/hurl/coverage/badges/flat.svg)](https://Orange-OpenSource.github.io/hurl/coverage)
|
||||
[![Crates.io](https://img.shields.io/crates/v/hurl.svg)](https://crates.io/crates/hurl)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-informational)](https://hurl.dev)
|
||||
[![documentation](https://img.shields.io/badge/-documentation-orange)](https://hurl.dev)
|
||||
|
||||
# What's Hurl?
|
||||
|
||||
@ -605,7 +604,7 @@ Hurl is very versatile, it enables to chain HTTP requests, capture values from H
|
||||
$ hurl session.hurl
|
||||
```
|
||||
|
||||
If no input-files are specified, input is read from stdin.
|
||||
If no input files are specified, input is read from stdin.
|
||||
|
||||
```
|
||||
$ echo GET http://httpbin.org/get | hurl
|
||||
@ -625,7 +624,7 @@ $ echo GET http://httpbin.org/get | hurl
|
||||
```
|
||||
|
||||
|
||||
Output goes to stdout by default. For output to a file, use the -o option:
|
||||
Output goes to stdout by default. For output to a file, use the [`-o, --output`](#output) option:
|
||||
|
||||
```
|
||||
$ hurl -o output input.hurl
|
||||
@ -633,7 +632,7 @@ $ hurl -o output input.hurl
|
||||
|
||||
By default, Hurl executes all HTTP requests and outputs the response body of the last HTTP call.
|
||||
|
||||
To have a test oriented output, you can use --test option:
|
||||
To have a test oriented output, you can use [`--test`](#test) option:
|
||||
|
||||
```
|
||||
$ hurl --test *.hurl
|
||||
@ -642,7 +641,7 @@ $ hurl --test *.hurl
|
||||
|
||||
## Hurl File Format
|
||||
|
||||
The Hurl file format is fully documented in <https://hurl.dev/docs/hurl-file.html>
|
||||
The Hurl file format is fully documented in [https://hurl.dev/docs/hurl-file.html](https://hurl.dev/docs/hurl-file.html)
|
||||
|
||||
It consists of one or several HTTP requests
|
||||
|
||||
@ -670,7 +669,7 @@ POST https://example.org/login?user=toto&password=1234
|
||||
X-CSRF-TOKEN: {{csrf_token}}
|
||||
```
|
||||
|
||||
More information on captures here <https://hurl.dev/docs/capturing-response.html>
|
||||
More information on captures here [https://hurl.dev/docs/capturing-response.html](https://hurl.dev/docs/capturing-response.html)
|
||||
|
||||
### Asserts
|
||||
|
||||
@ -702,23 +701,45 @@ xpath "string(//title)" == "301 Moved"
|
||||
|
||||
Thanks to asserts, Hurl can be used as a testing tool to run scenarii.
|
||||
|
||||
More information on asserts here <https://hurl.dev/docs/asserting-response.html>
|
||||
More information on asserts here [https://hurl.dev/docs/asserting-response.html](https://hurl.dev/docs/asserting-response.html)
|
||||
|
||||
## Options
|
||||
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
Options that exist in curl have exactly the same semantic.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
|
||||
For instance:
|
||||
|
||||
```
|
||||
$ hurl --location foo.hurl
|
||||
```
|
||||
|
||||
will follow redirection for each entry in `foo.hurl`. You can also define option only for a particular entry with an `[Options]` section. For instance, this Hurl file:
|
||||
|
||||
```hurl
|
||||
GET https://google.com
|
||||
HTTP/* 301
|
||||
|
||||
GET https://google.com
|
||||
[Options]
|
||||
location: true
|
||||
HTTP/* 200
|
||||
```
|
||||
|
||||
will follow redirection only for the second entry.
|
||||
|
||||
Option | Description
|
||||
--- | ---
|
||||
<a href="#cacert" id="cacert"><code>--cacert</code></a> | Tells curl to use the specified certificate file to verify the peer.<br/>The file may contain multiple CA certificates.<br/>The certificate(s) must be in PEM format.<br/>Normally curl is built to use a default file for this, so this option is typically used to alter that default file.<br/>
|
||||
<a href="#color" id="color"><code>--color</code></a> | Colorize Output<br/>
|
||||
<a href="#compressed" id="compressed"><code>--compressed</code></a> | Request a compressed response using one of the algorithms br, gzip, deflate and automatically decompress the content.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [-m, --max-time](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [-c, --cookie-jar](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [-b, --cookie](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#connect-timeout" id="connect-timeout"><code>--connect-timeout <seconds></code></a> | Maximum time in seconds that you allow Hurl's connection to take.<br/><br/>See also [`-m, --max-time`](#max-time) option.<br/>
|
||||
<a href="#cookie" id="cookie"><code>-b, --cookie <file></code></a> | Read cookies from file (using the Netscape cookie file format).<br/><br/>Combined with [`-c, --cookie-jar`](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar <file></code></a> | Write cookies to FILE after running the session (only for one session).<br/>The file will be written using the Netscape cookie file format.<br/><br/>Combined with [`-b, --cookie`](#cookie), you can simulate a cookie storage between successive Hurl runs.<br/>
|
||||
<a href="#fail-at-end" id="fail-at-end"><code>--fail-at-end</code></a> | Continue executing requests to the end of the Hurl file even when an assert error occurs.<br/>By default, Hurl exits after an assert error in the HTTP response.<br/><br/>Note that this option does not affect the behavior with multiple input Hurl files.<br/><br/>All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.<br/>
|
||||
<a href="#file-root" id="file-root"><code>--file-root <dir></code></a> | Set root filesystem to import files in Hurl. This is used for both files in multipart form data and request body.<br/>When this is not explicitly defined, the files are relative to the current directory in which Hurl is running.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [--max-redirs](#max-redirs) option.<br/>
|
||||
<a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. You can limit the amount of redirects to follow by using the [`--max-redirs`](#max-redirs) option.<br/>
|
||||
<a href="#glob" id="glob"><code>--glob <glob></code></a> | Specify input files that match the given glob pattern.<br/><br/>Multiple glob flags may be used. This flag supports common Unix glob patterns like *, ? and []. <br/>However, to avoid your shell accidentally expanding glob patterns before Hurl handles them, you must use single quotes or double quotes around each pattern.<br/>
|
||||
<a href="#include" id="include"><code>-i, --include</code></a> | Include the HTTP headers in the output (last entry).<br/>
|
||||
<a href="#ignore-asserts" id="ignore-asserts"><code>--ignore-asserts</code></a> | Ignore all asserts defined in the Hurl file.<br/>
|
||||
@ -726,8 +747,8 @@ Option | Description
|
||||
<a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br/>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br/>
|
||||
<a href="#json" id="json"><code>--json</code></a> | Output each hurl file result to JSON. The format is very closed to HAR format. <br/>
|
||||
<a href="#max-redirs" id="max-redirs"><code>--max-redirs <num></code></a> | Set maximum number of redirection-followings allowed<br/>By default, the limit is set to 50 redirections. Set this option to -1 to make it unlimited.<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [--connect-timeout](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize Output<br/>
|
||||
<a href="#max-time" id="max-time"><code>-m, --max-time <seconds></code></a> | Maximum time in seconds that you allow a request/response to take. This is the standard timeout.<br/><br/>See also [`--connect-timeout`](#connect-timeout) option.<br/>
|
||||
<a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize output<br/>
|
||||
<a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br/>
|
||||
<a href="#noproxy" id="noproxy"><code>--noproxy <no-proxy-list></code></a> | Comma-separated list of hosts which do not use a proxy.<br/>Override value from Environment variable no_proxy.<br/>
|
||||
<a href="#output" id="output"><code>-o, --output <file></code></a> | Write output to <file> instead of stdout.<br/>
|
||||
@ -736,12 +757,12 @@ Option | Description
|
||||
<a href="#report-junit" id="report-junit"><code>--report-junit <file></code></a> | Generate JUNIT <file>.<br/><br/>If the <file> report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#report-html" id="report-html"><code>--report-html <dir></code></a> | Generate HTML report in dir.<br/><br/>If the HTML report already exists, it will be updated with the new test results.<br/>
|
||||
<a href="#summary" id="summary"><code>--summary</code></a> | Print test metrics at the end of the run (on stderr)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [--no-output](#no-output) [--progress](#progress) [--summary](#summary)<br/>
|
||||
<a href="#test" id="test"><code>--test</code></a> | Activate test mode; equals [`--no-output`](#no-output) [`--progress`](#progress) [`--summary`](#summary)<br/>
|
||||
<a href="#to-entry" id="to-entry"><code>--to-entry <entry-number></code></a> | Execute Hurl file to ENTRY_NUMBER (starting at 1).<br/>Ignore the remaining of the file. It is useful for debugging a session.<br/>
|
||||
<a href="#user" id="user"><code>-u, --user <user:password></code></a> | Add basic Authentication header to each request.<br/>
|
||||
<a href="#user-agent" id="user-agent"><code>-A, --user-agent <name></code></a> | Specify the User-Agent string to send to the HTTP server.<br/>
|
||||
<a href="#variable" id="variable"><code>--variable <name=value></code></a> | Define variable (name/value) to be used in Hurl templates.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [--variable](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#variables-file" id="variables-file"><code>--variables-file <file></code></a> | Set properties file in which your define your variables.<br/><br/>Each variable is defined as name=value exactly as with [`--variable`](#variable) option.<br/><br/>Note that defining a variable twice produces an error.<br/>
|
||||
<a href="#verbose" id="verbose"><code>-v, --verbose</code></a> | Turn on verbose output on standard error stream<br/>Useful for debugging.<br/><br/>A line starting with '>' means data sent by Hurl.<br/>A line staring with '<' means data received by Hurl.<br/>A line starting with '*' means additional info provided by Hurl.<br/><br/>If you only want HTTP headers in the output, -i, --include might be the option you're looking for.<br/>
|
||||
<a href="#help" id="help"><code>-h, --help</code></a> | Usage help. This lists all current command line options with a short description.<br/>
|
||||
<a href="#version" id="version"><code>-V, --version</code></a> | Prints version information<br/>
|
||||
@ -750,15 +771,16 @@ Option | Description
|
||||
|
||||
Environment variables can only be specified in lowercase.
|
||||
|
||||
Using an environment variable to set the proxy has the same effect as using the [-x, --proxy](#proxy) option.
|
||||
Using an environment variable to set the proxy has the same effect as using the [`-x, --proxy`](#proxy) option.
|
||||
|
||||
Variable | Description
|
||||
--- | ---
|
||||
`http_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTP.<br/>
|
||||
`https_proxy [protocol://]<host>[:port]` | Sets the proxy server to use for HTTPS.<br/>
|
||||
`all_proxy [protocol://]<host>[:port]` | Sets the proxy server to use if no protocol-specific proxy is set.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | list of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [--variable](#variable) and [--variables-file](#variables-file) options.<br/>
|
||||
`no_proxy <comma-separated list of hosts>` | List of host names that shouldn't go through any proxy.<br/>
|
||||
`HURL_name value` | Define variable (name/value) to be used in Hurl templates. This is similar than [`--variable`](#variable) and [`--variables-file`](#variables-file) options.<br/>
|
||||
`NO_COLOR` | When set to a non-empty string, do not colorize output (see [`--no-color`](#no-color) option).<br/>
|
||||
|
||||
## Exit Codes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user