mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 17:23:25 +01:00
Renamed --session-read to --session-read-only.
This commit is contained in:
parent
66bdbc3745
commit
478d654945
@ -528,8 +528,9 @@ To switch to another session simple pass a different name:
|
||||
|
||||
$ http --session user2 -a user2:password example.org X-Bar:Foo
|
||||
|
||||
To use an existing session without updating it from the request/response
|
||||
exchange, specify the session via ``--session-read=SESSION_NAME`` instead.
|
||||
To use a session without updating it from the request/response exchange
|
||||
once it is created, specify the session name via
|
||||
``--session-read-only=SESSION_NAME`` instead.
|
||||
|
||||
You can view and manipulate existing sessions via the ``httpie`` management
|
||||
command, see ``httpie --help``.
|
||||
|
@ -235,8 +235,10 @@ sessions.add_argument(
|
||||
''')
|
||||
)
|
||||
sessions.add_argument(
|
||||
'--session-read', metavar='SESSION_NAME',
|
||||
help=_('''Create or reuse a session, but do not update it once saved.''')
|
||||
'--session-read-only', metavar='SESSION_NAME',
|
||||
help=_('''
|
||||
Create or reuse a session, but do not update it once saved.
|
||||
''')
|
||||
)
|
||||
|
||||
|
||||
|
@ -28,9 +28,9 @@ def get_response(args):
|
||||
return requests.request(**requests_kwargs)
|
||||
else:
|
||||
return sessions.get_response(
|
||||
name=args.session or args.session_read,
|
||||
name=args.session or args.session_read_only,
|
||||
request_kwargs=requests_kwargs,
|
||||
read_only=bool(args.session_read),
|
||||
read_only=bool(args.session_read_only),
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user