diff --git a/plugins/openclaw-weixin/src/api/api.ts b/plugins/openclaw-weixin/src/api/api.ts index 8e2a6c7..27b4764 100644 --- a/plugins/openclaw-weixin/src/api/api.ts +++ b/plugins/openclaw-weixin/src/api/api.ts @@ -65,11 +65,10 @@ function randomWechatUin(): string { return Buffer.from(String(uint32), "utf-8").toString("base64"); } -function buildHeaders(opts: { token?: string; body: string }): Record { +function buildHeaders(opts: { token?: string }): Record { const headers: Record = { "Content-Type": "application/json", AuthorizationType: "ilink_bot_token", - "Content-Length": String(Buffer.byteLength(opts.body, "utf-8")), "X-WECHAT-UIN": randomWechatUin(), }; if (opts.token?.trim()) { @@ -99,7 +98,7 @@ async function apiFetch(params: { }): Promise { const base = ensureTrailingSlash(params.baseUrl); const url = new URL(params.endpoint, base); - const hdrs = buildHeaders({ token: params.token, body: params.body }); + const hdrs = buildHeaders({ token: params.token }); logger.debug(`POST ${redactUrl(url.toString())} body=${redactBody(params.body)}`); const controller = new AbortController();