HttpHeaders
Base classes
| Name | Children | Inherits |
|---|---|---|
| QHttpHeaders PySide6.QtNetwork QHttpHeaders(self, /) -> None |
â‹” Inheritance diagram
graph TD
2498792734["network.HttpHeaders"]
488254416["QtNetwork.QHttpHeaders"]
37984305["Shiboken.Object"]
2751680898["builtins.object"]
488254416 --> 2498792734
37984305 --> 488254416
2751680898 --> 37984305
🛈 DocStrings
Bases: QHttpHeaders
Holds HTTP headers for network requests and replies.
Source code in prettyqt/network/httpheaders.py
append_header(name: HeaderNameType, value: str) -> bool
from_dict(headers: Mapping[str, str]) -> Self
classmethod
Create an HttpHeaders instance from a mapping of header names to values.
Source code in prettyqt/network/httpheaders.py
get_combined_value(name: HeaderNameType) -> str
Return all values for the given header name combined with commas.
get_value(name: HeaderNameType, default: str = '') -> str
Return the first value for the given header name, or default if absent.
Source code in prettyqt/network/httpheaders.py
get_values(name: HeaderNameType) -> list[str]
remove_all(name: HeaderNameType)
replace_or_append(name: HeaderNameType, value: str) -> bool
Replace the first occurrence of name or append if not present.
to_dict() -> dict[str, str]
to_list() -> list[tuple[str, str]]
Return all headers as a list of (name, value) string pairs.