You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Preserve individual headers with the same name on responses (#1208)
* Preserve individual headers with the same name on responses * Rename RequestHeadersDict to HTTPHeadersDict * Update tests/utils/http_server.py * Update tests/utils/http_server.py * Update httpie/adapters.py Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
This commit is contained in:
@@ -13,7 +13,7 @@ from urllib.parse import urlsplit
|
||||
from requests.auth import AuthBase
|
||||
from requests.cookies import RequestsCookieJar, create_cookie
|
||||
|
||||
from .cli.dicts import RequestHeadersDict
|
||||
from .cli.dicts import HTTPHeadersDict
|
||||
from .config import BaseConfigDict, DEFAULT_CONFIG_DIR
|
||||
from .plugins.registry import plugin_manager
|
||||
|
||||
@@ -65,7 +65,7 @@ class Session(BaseConfigDict):
|
||||
'password': None
|
||||
}
|
||||
|
||||
def update_headers(self, request_headers: RequestHeadersDict):
|
||||
def update_headers(self, request_headers: HTTPHeadersDict):
|
||||
"""
|
||||
Update the session headers with the request ones while ignoring
|
||||
certain name prefixes.
|
||||
@@ -98,8 +98,8 @@ class Session(BaseConfigDict):
|
||||
self['headers'] = dict(headers)
|
||||
|
||||
@property
|
||||
def headers(self) -> RequestHeadersDict:
|
||||
return RequestHeadersDict(self['headers'])
|
||||
def headers(self) -> HTTPHeadersDict:
|
||||
return HTTPHeadersDict(self['headers'])
|
||||
|
||||
@property
|
||||
def cookies(self) -> RequestsCookieJar:
|
||||
|
Reference in New Issue
Block a user