What's Changed
New headers object
class Headers:
def __init__(self, default_headers: Optional[dict]) -> None:
pass
def set(self, key: str, value: str) -> None:
"""
Sets the value of the header with the given key.
If the key already exists, the value will be appended to the list of values.
Args:
key (str): The key of the header
value (str): The value of the header
"""
pass
def get(self, key: str) -> Optional[str]:
"""
Gets the last value of the header with the given key.
Args:
key (str): The key of the header
"""
pass
def populate_from_dict(self, headers: dict[str, str]) -> None:
"""
Populates the headers from a dictionary.
Args:
headers (dict[str, str]): The dictionary of headers
"""
pass
def contains(self, key: str) -> bool:
"""
Returns:
True if the headers contain the key, False otherwise
Args:
key (str): The key of the header
"""
pass
def is_empty(self) -> bool:
pass
Full Changelog: v0.46.0...v0.47.0