MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / with_headers

Method with_headers

beanhub_cli/internal_api/client.py:58–64  ·  view source on GitHub ↗

Get a new client matching this one with additional headers

(self, headers: dict[str, str])

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected