Skip to content

Commit

Permalink
Add exit code 0 in manual
Browse files Browse the repository at this point in the history
  • Loading branch information
lepapareil authored and hurl-bot committed Apr 16, 2023
1 parent bd2a7f4 commit d7df56d
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 10 deletions.
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ but it's still the [curl] that we love.

# Feedbacks

[Feedback, suggestion, bugs or improvements] are welcome!
To support its development, [star Hurl on GitHub]!

[Feedback, suggestion, bugs or improvements] are welcome.

```hurl
POST https://hurl.dev/api/feedback
Expand Down Expand Up @@ -349,6 +351,36 @@ field3: file,example.zip; application/zip

[Doc](https://hurl.dev/docs/request.html#multipart-form-data)

Multipart forms can also be sent with a [multiline string body]:

~~~hurl
POST https://example.org/upload
Content-Type: multipart/form-data; boundary="boundary"
```
--boundary
Content-Disposition: form-data; name="key1"
value1
--boundary
Content-Disposition: form-data; name="upload1"; filename="data.txt"
Content-Type: text/plain
Hello World!
--boundary
Content-Disposition: form-data; name="upload2"; filename="data.html"
Content-Type: text/html
<div>Hello <b>World</b>!</div>
--boundary--
```
~~~

In that case, files have to be inlined in the Hurl file.

[Doc](https://hurl.dev/docs/request.html#multiline-string-body)



### Posting a JSON Body

With an inline JSON:
Expand Down Expand Up @@ -912,6 +944,7 @@ Using an environment variable to set the proxy has the same effect as using the

| Value | Description |
|-------|---------------------------------------------------------|
| `0` | Success.<br> |
| `1` | Failed to parse command-line options.<br> |
| `2` | Input File Parsing Error.<br> |
| `3` | Runtime error (such as failure to connect to host).<br> |
Expand All @@ -936,7 +969,7 @@ Precompiled binary is available at [hurl-2.0.1-x86_64-linux.tar.gz]:

```shell
$ INSTALL_DIR=/tmp
$ curl -sL https://github.com/Orange-OpenSource/hurl/releases/download/2.0.1/hurl-2.0.1-x86_64-linux.tar.gz | tar xvz -C $INSTALL_DIR
$ curl -silent --location https://github.com/Orange-OpenSource/hurl/releases/download/2.0.1/hurl-2.0.1-x86_64-linux.tar.gz | tar xvz -C $INSTALL_DIR
$ export PATH=$INSTALL_DIR/hurl-2.0.1:$PATH
```

Expand All @@ -945,7 +978,7 @@ $ export PATH=$INSTALL_DIR/hurl-2.0.1:$PATH
For Debian / Ubuntu, Hurl can be installed using a binary .deb file provided in each Hurl release.

```shell
$ curl -LO https://github.com/Orange-OpenSource/hurl/releases/download/2.0.1/hurl_2.0.1_amd64.deb
$ curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/2.0.1/hurl_2.0.1_amd64.deb
$ sudo apt update && apt install ./hurl_2.0.1_amd64.deb
```

Expand Down Expand Up @@ -1084,8 +1117,6 @@ $ ./target/release/hurl --version
Please follow the [contrib on Windows section].




[XPath]: https://en.wikipedia.org/wiki/XPath
[JSONPath]: https://goessner.net/articles/JsonPath/
[Rust]: https://www.rust-lang.org
Expand All @@ -1098,9 +1129,11 @@ Please follow the [contrib on Windows section].
[Blog]: https://hurl.dev/blog/
[GitHub]: https://github.com/Orange-OpenSource/hurl
[libcurl]: https://curl.se/libcurl/
[star Hurl on GitHub]: https://github.com/Orange-OpenSource/hurl/stargazers
[JSON body]: https://hurl.dev/docs/request.html#json-body
[XML body]: https://hurl.dev/docs/request.html#xml-body
[XML multiline string body]: https://hurl.dev/docs/request.html#multiline-string-body
[multiline string body]: https://hurl.dev/docs/request.html#multiline-string-body
[predicates]: https://hurl.dev/docs/asserting-response.html#predicates
[JSONPath]: https://goessner.net/articles/JsonPath/
[Basic authentication]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
Expand Down
1 change: 1 addition & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Using an environment variable to set the proxy has the same effect as using the

| Value | Description |
|-------|---------------------------------------------------------|
| `0` | Success.<br> |
| `1` | Failed to parse command-line options.<br> |
| `2` | Input File Parsing Error.<br> |
| `3` | Runtime error (such as failure to connect to host).<br> |
Expand Down
6 changes: 5 additions & 1 deletion docs/manual/hurl.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "02 Feb 2023" "hurl 3.0.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "16 Apr 2023" "hurl 3.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurl - run and test HTTP requests.
Expand Down Expand Up @@ -369,6 +369,10 @@ When set to a non-empty string, do not colorize output (see \fI--no-color\fP opt

.SH EXIT CODES

.IP "0"

Success.

.IP "1"

Failed to parse command-line options.
Expand Down
4 changes: 4 additions & 0 deletions docs/manual/hurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ When set to a non-empty string, do not colorize output (see [`--no-color`](#no-c

## EXIT CODES

### 0

Success.

### 1

Failed to parse command-line options.
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/hurlfmt.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "02 Feb 2023" "hurl 3.0.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "16 Apr 2023" "hurl 3.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurlfmt - format Hurl files
Expand Down
39 changes: 36 additions & 3 deletions packages/hurl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ but it's still the [curl] that we love.

# Feedbacks

[Feedback, suggestion, bugs or improvements] are welcome!
To support its development, [star Hurl on GitHub]!

[Feedback, suggestion, bugs or improvements] are welcome.

```hurl
POST https://hurl.dev/api/feedback
Expand Down Expand Up @@ -349,6 +351,36 @@ field3: file,example.zip; application/zip

[Doc](https://hurl.dev/docs/request.html#multipart-form-data)

Multipart forms can also be sent with a [multiline string body]:

~~~hurl
POST https://example.org/upload
Content-Type: multipart/form-data; boundary="boundary"
```
--boundary
Content-Disposition: form-data; name="key1"
value1
--boundary
Content-Disposition: form-data; name="upload1"; filename="data.txt"
Content-Type: text/plain
Hello World!
--boundary
Content-Disposition: form-data; name="upload2"; filename="data.html"
Content-Type: text/html
<div>Hello <b>World</b>!</div>
--boundary--
```
~~~

In that case, files have to be inlined in the Hurl file.

[Doc](https://hurl.dev/docs/request.html#multiline-string-body)



### Posting a JSON Body

With an inline JSON:
Expand Down Expand Up @@ -912,6 +944,7 @@ Using an environment variable to set the proxy has the same effect as using the

| Value | Description |
|-------|---------------------------------------------------------|
| `0` | Success.<br> |
| `1` | Failed to parse command-line options.<br> |
| `2` | Input File Parsing Error.<br> |
| `3` | Runtime error (such as failure to connect to host).<br> |
Expand Down Expand Up @@ -1084,8 +1117,6 @@ $ ./target/release/hurl --version
Please follow the [contrib on Windows section].




[XPath]: https://en.wikipedia.org/wiki/XPath
[JSONPath]: https://goessner.net/articles/JsonPath/
[Rust]: https://www.rust-lang.org
Expand All @@ -1098,9 +1129,11 @@ Please follow the [contrib on Windows section].
[Blog]: https://hurl.dev/blog/
[GitHub]: https://github.com/Orange-OpenSource/hurl
[libcurl]: https://curl.se/libcurl/
[star Hurl on GitHub]: https://github.com/Orange-OpenSource/hurl/stargazers
[JSON body]: https://hurl.dev/docs/request.html#json-body
[XML body]: https://hurl.dev/docs/request.html#xml-body
[XML multiline string body]: https://hurl.dev/docs/request.html#multiline-string-body
[multiline string body]: https://hurl.dev/docs/request.html#multiline-string-body
[predicates]: https://hurl.dev/docs/asserting-response.html#predicates
[JSONPath]: https://goessner.net/articles/JsonPath/
[Basic authentication]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
Expand Down

0 comments on commit d7df56d

Please sign in to comment.