mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:30:42 +00:00
fix(discord): bridge undici multipart types
This commit is contained in:
@@ -151,7 +151,7 @@ describe("createDiscordRestClient proxy support", () => {
|
||||
}
|
||||
const rest = createDiscordRequestClient("test-token", {
|
||||
baseUrl: `http://127.0.0.1:${address.port}`,
|
||||
fetch: undiciFetch as typeof fetch,
|
||||
fetch: undiciFetch as unknown as typeof fetch,
|
||||
queueRequests: false,
|
||||
});
|
||||
void rest
|
||||
|
||||
@@ -301,7 +301,7 @@ class ProxyRequestClientCompat {
|
||||
files: undefined,
|
||||
};
|
||||
formData.append("payload_json", JSON.stringify(cleanedBody));
|
||||
body = formData;
|
||||
body = formData as unknown as BodyInit;
|
||||
} else if (data?.body != null) {
|
||||
headers.set("Content-Type", "application/json");
|
||||
body = data.rawBody ? (data.body as BodyInit) : JSON.stringify(data.body);
|
||||
|
||||
Reference in New Issue
Block a user