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

Method with_headers

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

180 auth_header_name: str = "Authorization"
181
182 def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient":
183 """Get a new client matching this one with additional headers"""
184 if self._client is not None:
185 self._client.headers.update(headers)
186 if self._async_client is not None:
187 self._async_client.headers.update(headers)
188 return evolve(self, headers={**self._headers, **headers})
189
190 def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient":
191 """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