Kai
Kai
CDCloudflare Developers
Created by Kai on 1/21/2024 in #pages-help
req.json() parses as [object ReadableStream]
trying to call a worker through service bindings with setupDevBindings, when parsing the body for some weird reason i'm getting back the serialization of the readablestream object
const response = await process.env.WORKER_QUEUE.fetch("http://localhost:8787", {
method: "POST",
body: JSON.stringify({
hello: "world",
}),
headers: {
"Content-Type": "application/json",
},
});
const response = await process.env.WORKER_QUEUE.fetch("http://localhost:8787", {
method: "POST",
body: JSON.stringify({
hello: "world",
}),
headers: {
"Content-Type": "application/json",
},
});
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const data = await req.json();
console.log(data);
return new Response('OK');
},
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const data = await req.json();
console.log(data);
return new Response('OK');
},
"wrangler": "^3.23.0" "@cloudflare/next-on-pages": "^1.8.5", "next": "14.0.3" WSL2
1 replies
CDCloudflare Developers
Created by Kai on 5/24/2023 in #workers-help
wrangler: disable adding hash to static files
having a issue with wrangler adding hash on already processed static files such as client.1d7f9682.js -> client.1d7f9682.b897097c67.js. is there a way to tell wrangler to not generate hash for static files? wrangler deploy ./dist/_worker.js --compatibility-date 2023-05-24 --name test --site dist/_astro/
2 replies