mirror of
https://github.com/httpie/cli.git
synced 2024-11-28 08:38:44 +02:00
Updated documentation for query string params.
This commit is contained in:
parent
24d6331d15
commit
76a3125153
16
README.rst
16
README.rst
@ -54,7 +54,7 @@ Synopsis::
|
||||
|
||||
http [flags] [METHOD] URL [items]
|
||||
|
||||
There are four types of key-value pair items available:
|
||||
There are five types of key-value pair items available:
|
||||
|
||||
Headers (``Name:Value``)
|
||||
Arbitrary HTTP headers. The ``:`` character is used to separate a header's
|
||||
@ -77,6 +77,9 @@ File fields (``field@/path/to/file``)
|
||||
``screenshot@/path/to/file.png``. The presence of a file field results into
|
||||
a ``multipart/form-data`` request.
|
||||
|
||||
Query String Parameters (``name=:value``)
|
||||
Appends the given name/value pair as a query string to the URL.
|
||||
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
@ -118,6 +121,12 @@ The above will send the same request as if the following HTML form were submitte
|
||||
<input type="file" name="cv" />
|
||||
</form>
|
||||
|
||||
Query string parameters can be added to any request::
|
||||
|
||||
http GET example.com/ search=:donuts
|
||||
|
||||
Will GET the URL "example.com/?search=donuts".
|
||||
|
||||
A whole request body can be passed in via **``stdin``** instead, in which
|
||||
case it will be used with no further processing::
|
||||
|
||||
@ -172,8 +181,9 @@ See ``http -h`` for more details::
|
||||
include one.
|
||||
ITEM A key-value pair whose type is defined by the
|
||||
separator used. It can be an HTTP header
|
||||
(header:value), a data field to be used in the request
|
||||
body (field_name=value), a raw JSON data field
|
||||
(header:value), a query parameter (name=:value),
|
||||
a data field to be used in the request body
|
||||
(field_name=value), a raw JSON data field
|
||||
(field_name:=value), or a file field
|
||||
(field_name@/path/to/file). You can use a backslash to
|
||||
escape a colliding separator in the field name.
|
||||
|
@ -212,7 +212,8 @@ parser.add_argument(
|
||||
A key-value pair whose type is defined by the
|
||||
separator used. It can be an HTTP header (header:value),
|
||||
a data field to be used in the request body (field_name=value),
|
||||
a raw JSON data field (field_name:=value),
|
||||
a raw JSON data field (field_name:=value),
|
||||
a query parameter (name=:value),
|
||||
or a file field (field_name@/path/to/file).
|
||||
You can use a backslash to escape a colliding
|
||||
separator in the field name.
|
||||
|
Loading…
Reference in New Issue
Block a user