MCPcopy Create free account
hub / github.com/OpenRouterTeam/python-sdk / get_headers

Function get_headers

src/openrouter/utils/headers.py:21–30  ·  view source on GitHub ↗
(headers_params: Any, gbls: Optional[Any] = None)

Source from the content-addressed store, hash-verified

19
20
21def get_headers(headers_params: Any, gbls: Optional[Any] = None) -> Dict[str, str]:
22 headers: Dict[str, str] = {}
23
24 globals_already_populated = []
25 if _is_set(headers_params):
26 globals_already_populated = _populate_headers(headers_params, gbls, headers, [])
27 if _is_set(gbls):
28 _populate_headers(gbls, None, headers, globals_already_populated)
29
30 return headers
31
32
33def _populate_headers(

Callers

nothing calls this directly

Calls 2

_is_setFunction · 0.85
_populate_headersFunction · 0.85

Tested by

no test coverage detected