Get a new client matching this one with additional headers
(self, headers: dict[str, str])
| 56 | _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) |
| 57 | |
| 58 | def with_headers(self, headers: dict[str, str]) -> "Client": |
| 59 | """Get a new client matching this one with additional headers""" |
| 60 | if self._client is not None: |
| 61 | self._client.headers.update(headers) |
| 62 | if self._async_client is not None: |
| 63 | self._async_client.headers.update(headers) |
| 64 | return evolve(self, headers={**self._headers, **headers}) |
| 65 | |
| 66 | def with_cookies(self, cookies: dict[str, str]) -> "Client": |
| 67 | """Get a new client matching this one with additional cookies""" |
nothing calls this directly
no outgoing calls
no test coverage detected