Files
openclaw/extensions/discord/src/test-http-helpers.ts
2026-06-04 22:06:01 -04:00

12 lines
361 B
TypeScript

// Discord helper module supports test http helpers behavior.
export function jsonResponse(body: unknown, status = 200): Response {
return new Response(JSON.stringify(body), { status });
}
export function urlToString(url: Request | URL | string): string {
if (typeof url === "string") {
return url;
}
return "url" in url ? url.url : String(url);
}