1
0
mirror of https://github.com/httpie/cli.git synced 2024-11-28 08:38:44 +02:00

Fixed README.

This commit is contained in:
Jakub Roztočil 2012-03-04 02:48:31 +01:00
parent b802f2b960
commit 5ff43b659f

View File

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