MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / _get_headers

Method _get_headers

src/services/moe_mail.py:81–92  ·  view source on GitHub ↗

获取 API 请求头

(self)

Source from the content-addressed store, hash-verified

79 self._cached_config: Optional[Dict[str, Any]] = None
80
81 def _get_headers(self) -> Dict[str, str]:
82 """获取 API 请求头"""
83 headers = {
84 "Accept": "application/json",
85 "Content-Type": "application/json",
86 }
87
88 # 添加 API 密钥
89 api_key_header = self.config.get("api_key_header", "X-API-Key")
90 headers[api_key_header] = self.config["api_key"]
91
92 return headers
93
94 def _make_request(self, method: str, endpoint: str, **kwargs) -> Dict[str, Any]:
95 """

Callers 1

_make_requestMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected