Get a new client matching this one with additional headers
(self, headers: Dict[str, str])
| 46 | _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) |
| 47 | |
| 48 | def with_headers(self, headers: Dict[str, str]) -> "Client": |
| 49 | """Get a new client matching this one with additional headers""" |
| 50 | if self._client is not None: |
| 51 | self._client.headers.update(headers) |
| 52 | if self._async_client is not None: |
| 53 | self._async_client.headers.update(headers) |
| 54 | return evolve(self, headers={**self._headers, **headers}) |
| 55 | |
| 56 | def with_cookies(self, cookies: Dict[str, str]) -> "Client": |
| 57 | """Get a new client matching this one with additional cookies""" |
nothing calls this directly
no outgoing calls
no test coverage detected