1
0
mirror of https://github.com/httpie/cli.git synced 2025-04-21 12:06:51 +02:00

Updated readme (--flags).

This commit is contained in:
Jakub Roztočil 2012-03-04 01:59:00 +01:00
parent 00312ead28
commit 73d0f9cd56

View File

@ -34,47 +34,47 @@ The data to be sent can also be passed via `stdin`:
http PUT api.example.com/person/1 X-API-Token:123 < person.json http PUT api.example.com/person/1 X-API-Token:123 < person.json
Most of the flags mirror the arguments you would use with `requests.request`. See `http -h`: Most of the flags mirror the arguments you would use with `requests.request`. See `http -h`:
usage: http [-h] [--json | --form] [--traceback] [--ugly] [--headers | --body]
[--request] [--style STYLE] [--auth AUTH] [--verify VERIFY]
[--proxy PROXY] [--allow-redirects] [--file PATH]
[--timeout TIMEOUT]
method URL [item [item ...]]
usage: http [-h] [--json | --form] [--traceback] [--ugly] [--headers | --body] HTTPie - cURL for humans.
[--style STYLE] [--auth AUTH] [--verify VERIFY] [--proxy PROXY]
[--allow-redirects] [--file PATH] [--timeout TIMEOUT]
method URL [item [item ...]]
HTTPie - cURL for humans. positional arguments:
method HTTP method to be used for the request (GET, POST,
PUT, DELETE, PATCH, ...).
URL Protocol defaults to http:// if the URL does not
include it.
item HTTP header (key:value) or data field (key=value)
positional arguments: optional arguments:
method HTTP method to be used for the request (GET, POST, -h, --help show this help message and exit
PUT, DELETE, PATCH, ...). --json, -j Serialize data items as a JSON object and set Content-
URL Protocol defaults to http:// if the URL does not Type to application/json, if not specified.
include it. --form, -f Serialize data items as form values and set Content-
item HTTP header (key:value) or data field (key=value) Type to application/x-www-form-urlencoded, if not
specified.
optional arguments: --traceback Print a full exception traceback should one occur.
-h, --help show this help message and exit --ugly, -u Do not prettify the response.
--json, -j Serialize data items as a JSON object and set Content- --headers, -t Print only the response headers.
Type to application/json, if not specified. --body, -b Print only the response body.
--form, -f Serialize data items as form values and set Content- --request, -r Print only the response body.
Type to application/x-www-form-urlencoded, if not --style STYLE, -s STYLE
specified. Output coloring style, one of autumn, borland, bw,
--traceback Print a full exception traceback should one be raised colorful, default, emacs, friendly, fruity, manni,
by `requests`. monokai, murphy, native, pastie, perldoc, solarized,
--ugly, -u Do not prettify the response. tango, trac, vim, vs. Defaults to solarized.
--headers, -t Print only the response headers. --auth AUTH, -a AUTH username:password
--body, -b Print only the response body. --verify VERIFY Set to "yes" to check the host's SSL certificate. You
--style STYLE, -s STYLE can also pass the path to a CA_BUNDLE file for private
Output coloring style, one of autumn, borland, bw, certs. You can also set the REQUESTS_CA_BUNDLE
colorful, default, emacs, friendly, fruity, manni, environment variable.
monokai, murphy, native, pastie, perldoc, solarized, --proxy PROXY String mapping protocol to the URL of the proxy (e.g.
tango, trac, vim, vs. Defaults to solarized. http:foo.bar:3128).
--auth AUTH, -a AUTH username:password --allow-redirects Set this flag if full redirects are allowed (e.g. re-
--verify VERIFY Set to "yes" to check the host's SSL certificate. You POST-ing of data at new ``Location``)
can also pass the path to a CA_BUNDLE file for private --file PATH File to multipart upload
certs. You can also set the REQUESTS_CA_BUNDLE --timeout TIMEOUT Float describes the timeout of the request (Use
environment variable. socket.setdefaulttimeout() as fallback).
--proxy PROXY String mapping protocol to the URL of the proxy (e.g.
http:foo.bar:3128).
--allow-redirects Set this flag if full redirects are allowed (e.g. re-
POST-ing of data at new ``Location``)
--file PATH File to multipart upload
--timeout TIMEOUT Float describes the timeout of the request (Use
socket.setdefaulttimeout() as fallback).