MCPcopy Index your code
hub / github.com/e2b-dev/E2B / with_headers

Method with_headers

packages/python-sdk/e2b/api/client/client.py:54–60  ·  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

52 _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False)
53
54 def with_headers(self, headers: dict[str, str]) -> "Client":
55 """Get a new client matching this one with additional headers"""
56 if self._client is not None:
57 self._client.headers.update(headers)
58 if self._async_client is not None:
59 self._async_client.headers.update(headers)
60 return evolve(self, headers={**self._headers, **headers})
61
62 def with_cookies(self, cookies: dict[str, str]) -> "Client":
63 """Get a new client matching this one with additional cookies"""

Callers

nothing calls this directly

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected