1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Remove automatic config file creation to avoid concurrency issues.

Close #788
Close #812
This commit is contained in:
Jakub Roztocil
2019-12-02 17:43:16 +01:00
parent f0058eeaee
commit f202f338a4
11 changed files with 178 additions and 141 deletions

View File

@@ -1,4 +1,5 @@
"""Persistent, JSON-serialized sessions.
"""
Persistent, JSON-serialized sessions.
"""
import os
@@ -53,8 +54,7 @@ class Session(BaseConfigDict):
about = 'HTTPie session file'
def __init__(self, path: Union[str, Path]):
super().__init__()
self._path = Path(path)
super().__init__(path=Path(path))
self['headers'] = {}
self['cookies'] = {}
self['auth'] = {
@@ -63,9 +63,6 @@ class Session(BaseConfigDict):
'password': None
}
def _get_path(self) -> Path:
return self._path
def update_headers(self, request_headers: RequestHeadersDict):
"""
Update the session headers with the request ones while ignoring