mirror of
https://github.com/httpie/cli.git
synced 2025-01-06 05:39:08 +01:00
README
This commit is contained in:
parent
8a9cedb16e
commit
f74424ef03
12
README.rst
12
README.rst
@ -508,25 +508,25 @@ Sessions
|
|||||||
|
|
||||||
*This is an experimental feature.*
|
*This is an experimental feature.*
|
||||||
|
|
||||||
HTTPie supports named sessions, where several options and cookies sent
|
HTTPie supports named sessions, where custom headers, authorization,
|
||||||
by the server persist between requests:
|
and cookies sent by the server persist between requests:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
http --session=user1 --auth=user1:password example.org X-Foo:Bar
|
http --session=user1 --auth=user1:password example.org X-Foo:Bar
|
||||||
|
|
||||||
|
|
||||||
Now you can always refer to the session by passing ``--session=user1``,
|
Now you can always refer to the session by passing ``--session=user1``:
|
||||||
and the credentials, custom headers and cookies will be reused:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
http --session=user1 example.org
|
http --session=user1 example.org
|
||||||
|
|
||||||
|
|
||||||
Note that session cookies respect the cookie domain and path.
|
Note that cookies respect the cookie domain and path.
|
||||||
|
|
||||||
Session data are stored in ``~/.httpie/sessions/<name>.json``.
|
Session data are stored in ``~/.httpie/sessions/<name>.json``
|
||||||
|
(``%APPDATA%\httpie\sessions`` on Windows).
|
||||||
|
|
||||||
You can view and manipulate existing sessions via the ``httpie`` management
|
You can view and manipulate existing sessions via the ``httpie`` management
|
||||||
command, see ``httpie --help``.
|
command, see ``httpie --help``.
|
||||||
|
Loading…
Reference in New Issue
Block a user