This commit is contained in:
Kentai Radiquum 2025-03-16 03:02:44 +05:00
parent 28c203114b
commit cbdbd95e81
Signed by: Radiquum
GPG key ID: 858E8EE696525EED

View file

@ -179,11 +179,16 @@ export default async function middleware(
// });
// }
const params = await request.json()
const formData = new FormData();
for (const [key, value] of Object.entries(await request.json())) {
for (const [key, value] of Object.entries(params)) {
formData.append(key as any, value as any);
}
console.log("get JSON:", params);
console.log("send FORM:", formData);
const response = await fetch(`https://${path}`, {
method: "POST",
body: formData,