Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Oct 8, 2022
1 parent fe4794e commit 906bd70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ Run `xh help` for more detailed information.
- `@` for including files in multipart requests e.g `[email protected]` or `[email protected];type=image/jpeg;filename=goodbye.jpg`.
- `:` for adding or removing headers e.g `connection:keep-alive` or `connection:`.
- `;` for including headers with empty values e.g `header-without-value;`.
- `=@`/`:=@` for setting the request body's JSON or form fields from a file (`=@` for strings and `:=@` for other JSON types).

`@` postfix can be added to `=`,`:=`,`==` and `:` to read the value from a file e.g `x-api-key:@api-key.txt`.

The request body can also be read from standard input, or from a file using `@filename`.

Expand Down
2 changes: 2 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ pub struct Cli {
/// - header: to unset a header
/// - header; to add a header with an empty value
///
/// `@` postfix can be added to `=`,`:=`,`==` and `:` to read the value from a file e.g. `x-api-key:@api-key.txt`.
///
/// A backslash can be used to escape special characters (e.g. weird\:key=value).
#[clap(value_name = "REQUEST_ITEM", verbatim_doc_comment)]
raw_rest_args: Vec<String>,
Expand Down

0 comments on commit 906bd70

Please sign in to comment.