MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / with_headers

Method with_headers

trainer/src/api_client/client.py:48–54  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected