Skip to content

Commit

Permalink
bump version 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Nov 15, 2021
1 parent 22e82e5 commit 83d76e5
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xh"
version = "0.13.0"
version = "0.14.0"
authors = ["ducaale <sharaf.13@hotmail.com>"]
edition = "2018"
license = "MIT"
Expand Down
79 changes: 41 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,47 @@ USAGE:
xh [OPTIONS] <[METHOD] URL> [--] [REQUEST_ITEM]...
OPTIONS:
-j, --json (default) Serialize data items from the command line as a JSON object
-f, --form Serialize data items from the command line as form fields
-m, --multipart Like --form, but force a multipart/form-data request even without files
--pretty <STYLE> Controls output processing [possible values: all, colors, format, none]
-s, --style <THEME> Output coloring style [possible values: auto, solarized, monokai]
-p, --print <FORMAT> String specifying what the output should contain
-h, --headers Print only the response headers, shortcut for --print=h
-b, --body Print only the response body, Shortcut for --print=b
-v, --verbose Print the whole request as well as the response
--all Show any intermediary requests/responses while following redirects with --follow
-P, --history-print <FORMAT> The same as --print but applies only to intermediary requests/responses
-q, --quiet Do not print to stdout or stderr
-S, --stream Always stream the response body
-o, --output <FILE> Save output to FILE instead of stdout
-d, --download Download the body to a file instead of printing it
-c, --continue Resume an interrupted download. Requires --download and --output
--session <FILE> Create, or reuse and update a session
--session-read-only <FILE> Create or read a session without updating it form the request/response exchange
-a, --auth <USER[:PASS]> Authenticate as USER with PASS. PASS will be prompted if missing
--bearer <TOKEN> Authenticate with a bearer token
--ignore-netrc Do not use credentials from .netrc
--offline Construct HTTP requests without sending them anywhere
--check-status (default) Exit with an error status code if the server replies with an error
-F, --follow Do follow redirects
--max-redirects <NUM> Number of redirects to follow, only respected if `follow` is set
--timeout <SEC> Connection timeout of the request
--proxy <PROTOCOL:URL>... Use a proxy for a protocol. For example: `--proxy https:http://proxy.host:8080`
--verify <VERIFY> If "no", skip SSL verification. If a file path, use it as a CA bundle
--cert <FILE> Use a client side certificate for SSL
--cert-key <FILE> A private key file to use with --cert
--native-tls Use the system TLS library instead of rustls (if enabled at compile time)
--https Make HTTPS requests if not specified in the URL
--http-version <VERSION> HTTP version to use [possible values: 1, 1.0, 1.1, 2]
-I, --ignore-stdin Do not attempt to read stdin
--curl Print a translation to a `curl` command
--curl-long Use the long versions of curl's flags
--help Prints help information
-V, --version Prints version information
-j, --json (default) Serialize data items from the command line as a JSON object
-f, --form Serialize data items from the command line as form fields
-m, --multipart Like --form, but force a multipart/form-data request even without files
--pretty <STYLE> Controls output processing [possible values: all, colors, format, none]
-s, --style <THEME> Output coloring style [possible values: auto, solarized, monokai]
--response-charset <ENCODING> Override the response encoding for terminal display purposes
--response-mime <MIME_TYPE> Override the response mime type for coloring and formatting for the terminal
-p, --print <FORMAT> String specifying what the output should contain
-h, --headers Print only the response headers, shortcut for --print=h
-b, --body Print only the response body, Shortcut for --print=b
-v, --verbose Print the whole request as well as the response
--all Show any intermediary requests/responses while following redirects with --follow
-P, --history-print <FORMAT> The same as --print but applies only to intermediary requests/responses
-q, --quiet Do not print to stdout or stderr
-S, --stream Always stream the response body
-o, --output <FILE> Save output to FILE instead of stdout
-d, --download Download the body to a file instead of printing it
-c, --continue Resume an interrupted download. Requires --download and --output
--session <FILE> Create, or reuse and update a session
--session-read-only <FILE> Create or read a session without updating it form the request/response exchange
-A, --auth-type <auth-type> Specify the auth mechanism [possible values: basic, bearer, digest]
-a, --auth <USER[:PASS] | TOKEN> Authenticate as USER with PASS or with TOKEN
--ignore-netrc Do not use credentials from .netrc
--offline Construct HTTP requests without sending them anywhere
--check-status (default) Exit with an error status code if the server replies with an error
-F, --follow Do follow redirects
--max-redirects <NUM> Number of redirects to follow, only respected if `follow` is set
--timeout <SEC> Connection timeout of the request
--proxy <PROTOCOL:URL>... Use a proxy for a protocol. For example: `--proxy https:http://proxy.host:8080`
--verify <VERIFY> If "no", skip SSL verification. If a file path, use it as a CA bundle
--cert <FILE> Use a client side certificate for SSL
--cert-key <FILE> A private key file to use with --cert
--ssl <VERSION> Force a particular TLS version [possible values: auto, ssl2.3, tls1, tls1.1, tls1.2, tls1.3]
--native-tls Use the system TLS library instead of rustls (if enabled at compile time)
--https Make HTTPS requests if not specified in the URL
--http-version <VERSION> HTTP version to use [possible values: 1, 1.0, 1.1, 2]
-I, --ignore-stdin Do not attempt to read stdin
--curl Print a translation to a `curl` command
--curl-long Use the long versions of curl's flags
--help Prints help information
-V, --version Prints version information
ARGS:
<[METHOD] URL> The request URL, preceded by an optional HTTP method
Expand Down
16 changes: 12 additions & 4 deletions completions/_xh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ _xh() {
'--pretty=[Controls output processing]: :(all colors format none)' \
'-s+[Output coloring style]: :(auto solarized monokai)' \
'--style=[Output coloring style]: :(auto solarized monokai)' \
'--response-charset=[Override the response encoding for terminal display purposes]' \
'--response-mime=[Override the response mime type for coloring and formatting for the terminal]' \
'-p+[String specifying what the output should contain]' \
'--print=[String specifying what the output should contain]' \
'-P+[The same as --print but applies only to intermediary requests/responses]' \
Expand All @@ -26,18 +28,20 @@ _xh() {
'--output=[Save output to FILE instead of stdout]' \
'--session=[Create, or reuse and update a session]' \
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange]' \
'-A+[Specify the auth mechanism]: :(basic bearer)' \
'--auth-type=[Specify the auth mechanism]: :(basic bearer)' \
'-a+[Authenticate as USER with PASS. PASS will be prompted if missing]' \
'--auth=[Authenticate as USER with PASS. PASS will be prompted if missing]' \
'-A+[Specify the auth mechanism]: :(basic bearer digest)' \
'--auth-type=[Specify the auth mechanism]: :(basic bearer digest)' \
'-a+[Authenticate as USER with PASS or with TOKEN]' \
'--auth=[Authenticate as USER with PASS or with TOKEN]' \
'--bearer=[Authenticate with a bearer token]' \
'--max-redirects=[Number of redirects to follow, only respected if `follow` is set]' \
'--timeout=[Connection timeout of the request]' \
'*--proxy=[Use a proxy for a protocol. For example: `--proxy https:http://proxy.host:8080`]' \
'--verify=[If "no", skip SSL verification. If a file path, use it as a CA bundle]' \
'--cert=[Use a client side certificate for SSL]' \
'--cert-key=[A private key file to use with --cert]' \
'--ssl=[Force a particular TLS version]: :(auto ssl2.3 tls1 tls1.1 tls1.2 tls1.3)' \
'--default-scheme=[The default scheme to use if not specified in the URL]' \
'--http-version=[HTTP version to use]: :(1 1.0 1.1 2)' \
'-j[(default) Serialize data items from the command line as a JSON object]' \
'--json[(default) Serialize data items from the command line as a JSON object]' \
'-f[Serialize data items from the command line as form fields]' \
Expand Down Expand Up @@ -87,6 +91,7 @@ _xh() {
'--no-form[]' \
'--no-headers[]' \
'--no-history-print[]' \
'--no-http-version[]' \
'--no-https[]' \
'--no-ignore-netrc[]' \
'--no-ignore-stdin[]' \
Expand All @@ -100,8 +105,11 @@ _xh() {
'--no-print[]' \
'--no-proxy[]' \
'--no-quiet[]' \
'--no-response-charset[]' \
'--no-response-mime[]' \
'--no-session[]' \
'--no-session-read-only[]' \
'--no-ssl[]' \
'--no-stream[]' \
'--no-style[]' \
'--no-timeout[]' \
Expand Down
12 changes: 10 additions & 2 deletions completions/_xh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Controls output processing')
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Output coloring style')
[CompletionResult]::new('--style', 'style', [CompletionResultType]::ParameterName, 'Output coloring style')
[CompletionResult]::new('--response-charset', 'response-charset', [CompletionResultType]::ParameterName, 'Override the response encoding for terminal display purposes')
[CompletionResult]::new('--response-mime', 'response-mime', [CompletionResultType]::ParameterName, 'Override the response mime type for coloring and formatting for the terminal')
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'String specifying what the output should contain')
[CompletionResult]::new('--print', 'print', [CompletionResultType]::ParameterName, 'String specifying what the output should contain')
[CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'The same as --print but applies only to intermediary requests/responses')
Expand All @@ -33,16 +35,18 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--session-read-only', 'session-read-only', [CompletionResultType]::ParameterName, 'Create or read a session without updating it form the request/response exchange')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Specify the auth mechanism')
[CompletionResult]::new('--auth-type', 'auth-type', [CompletionResultType]::ParameterName, 'Specify the auth mechanism')
[CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS. PASS will be prompted if missing')
[CompletionResult]::new('--auth', 'auth', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS. PASS will be prompted if missing')
[CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS or with TOKEN')
[CompletionResult]::new('--auth', 'auth', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS or with TOKEN')
[CompletionResult]::new('--bearer', 'bearer', [CompletionResultType]::ParameterName, 'Authenticate with a bearer token')
[CompletionResult]::new('--max-redirects', 'max-redirects', [CompletionResultType]::ParameterName, 'Number of redirects to follow, only respected if `follow` is set')
[CompletionResult]::new('--timeout', 'timeout', [CompletionResultType]::ParameterName, 'Connection timeout of the request')
[CompletionResult]::new('--proxy', 'proxy', [CompletionResultType]::ParameterName, 'Use a proxy for a protocol. For example: `--proxy https:http://proxy.host:8080`')
[CompletionResult]::new('--verify', 'verify', [CompletionResultType]::ParameterName, 'If "no", skip SSL verification. If a file path, use it as a CA bundle')
[CompletionResult]::new('--cert', 'cert', [CompletionResultType]::ParameterName, 'Use a client side certificate for SSL')
[CompletionResult]::new('--cert-key', 'cert-key', [CompletionResultType]::ParameterName, 'A private key file to use with --cert')
[CompletionResult]::new('--ssl', 'ssl', [CompletionResultType]::ParameterName, 'Force a particular TLS version')
[CompletionResult]::new('--default-scheme', 'default-scheme', [CompletionResultType]::ParameterName, 'The default scheme to use if not specified in the URL')
[CompletionResult]::new('--http-version', 'http-version', [CompletionResultType]::ParameterName, 'HTTP version to use')
[CompletionResult]::new('-j', 'j', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object')
[CompletionResult]::new('--json', 'json', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object')
[CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields')
Expand Down Expand Up @@ -92,6 +96,7 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--no-form', 'no-form', [CompletionResultType]::ParameterName, 'no-form')
[CompletionResult]::new('--no-headers', 'no-headers', [CompletionResultType]::ParameterName, 'no-headers')
[CompletionResult]::new('--no-history-print', 'no-history-print', [CompletionResultType]::ParameterName, 'no-history-print')
[CompletionResult]::new('--no-http-version', 'no-http-version', [CompletionResultType]::ParameterName, 'no-http-version')
[CompletionResult]::new('--no-https', 'no-https', [CompletionResultType]::ParameterName, 'no-https')
[CompletionResult]::new('--no-ignore-netrc', 'no-ignore-netrc', [CompletionResultType]::ParameterName, 'no-ignore-netrc')
[CompletionResult]::new('--no-ignore-stdin', 'no-ignore-stdin', [CompletionResultType]::ParameterName, 'no-ignore-stdin')
Expand All @@ -105,8 +110,11 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--no-print', 'no-print', [CompletionResultType]::ParameterName, 'no-print')
[CompletionResult]::new('--no-proxy', 'no-proxy', [CompletionResultType]::ParameterName, 'no-proxy')
[CompletionResult]::new('--no-quiet', 'no-quiet', [CompletionResultType]::ParameterName, 'no-quiet')
[CompletionResult]::new('--no-response-charset', 'no-response-charset', [CompletionResultType]::ParameterName, 'no-response-charset')
[CompletionResult]::new('--no-response-mime', 'no-response-mime', [CompletionResultType]::ParameterName, 'no-response-mime')
[CompletionResult]::new('--no-session', 'no-session', [CompletionResultType]::ParameterName, 'no-session')
[CompletionResult]::new('--no-session-read-only', 'no-session-read-only', [CompletionResultType]::ParameterName, 'no-session-read-only')
[CompletionResult]::new('--no-ssl', 'no-ssl', [CompletionResultType]::ParameterName, 'no-ssl')
[CompletionResult]::new('--no-stream', 'no-stream', [CompletionResultType]::ParameterName, 'no-stream')
[CompletionResult]::new('--no-style', 'no-style', [CompletionResultType]::ParameterName, 'no-style')
[CompletionResult]::new('--no-timeout', 'no-timeout', [CompletionResultType]::ParameterName, 'no-timeout')
Expand Down
Loading

0 comments on commit 83d76e5

Please sign in to comment.