mirror of
https://github.com/httpie/cli.git
synced 2024-11-08 17:04:50 +01:00
Formatting
This commit is contained in:
parent
6fd1ea0e5a
commit
c9c6f0fae5
31
README.rst
31
README.rst
@ -652,14 +652,41 @@ HTTPie does not offer any special syntax for specifying cookies — the usual
|
||||
``Header:Value`` notation is used:
|
||||
|
||||
|
||||
Send a single cookie:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Send a single cookie:
|
||||
$ http example.org Cookie:sessionid=foo
|
||||
|
||||
# Send multiple cookies (quoted to prevent the shell from interpreting the ';'):
|
||||
.. code-block:: http
|
||||
|
||||
GET / HTTP/1.1
|
||||
Accept: */*
|
||||
Accept-Encoding: gzip, deflate
|
||||
Connection: keep-alive
|
||||
Cookie: sessionid=foo
|
||||
Host: example.org
|
||||
User-Agent: HTTPie/0.9.9
|
||||
|
||||
|
||||
Send multiple cookies
|
||||
(note the header is quoted to prevent the shell from interpreting the ``;``):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ http example.org 'Cookie:sessionid=foo;another-cookie=bar'
|
||||
|
||||
.. code-block:: http
|
||||
|
||||
GET / HTTP/1.1
|
||||
Accept: */*
|
||||
Accept-Encoding: gzip, deflate
|
||||
Connection: keep-alive
|
||||
Cookie: sessionid=foo;another-cookie=bar
|
||||
Host: example.org
|
||||
User-Agent: HTTPie/0.9.9
|
||||
|
||||
|
||||
If you often deal with cookies in your requests, then chances are you'd appreciate
|
||||
the `sessions`_ feature.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user