Isaac McFadyen | YYZ01
04/16/2022, 10:43 PMrequest.url
used up, or is that only the body?Isaac McFadyen | YYZ01
04/16/2022, 10:43 PMJames
04/16/2022, 10:44 PMurl
is definitely dead here, copied from my other codeIsaac McFadyen | YYZ01
04/16/2022, 10:44 PMIsaac McFadyen | YYZ01
04/16/2022, 10:44 PMIsaac McFadyen | YYZ01
04/16/2022, 10:44 PMIsaac McFadyen | YYZ01
04/16/2022, 10:45 PMJames
04/16/2022, 10:45 PMFailed to parse URL
errors locally when trying to do that. A real URL
object was the only way to make that workWalshy | Pages
04/16/2022, 10:57 PMWalshy | Pages
04/16/2022, 10:58 PMkian
04/16/2022, 10:58 PMkian
04/16/2022, 10:58 PMkian
04/16/2022, 10:58 PM/./
James
04/16/2022, 10:58 PMWalshy | Pages
04/16/2022, 10:58 PMJames
04/16/2022, 11:28 PMkian
04/16/2022, 11:29 PMWalshy | Pages
04/17/2022, 4:22 AMWalshy | Pages
04/17/2022, 4:22 AMGreg Brimble | Cloudflare Pages
04/17/2022, 5:50 AMnext
fix goes out, I think we’ll try get everyone using that instead of env.ASSETS.fetch
wherever possible. It’ll still exist (and we’ll try improving it) but it’s tricky to use correctly. You should be doing content negotiation to ensure the incoming request is getting a response that it can handle. next
will automatically pass all of that through for you.Greg Brimble | Cloudflare Pages
04/17/2022, 5:51 AMorstavik77
04/19/2022, 8:32 AMGreg Brimble | Cloudflare Pages
04/19/2022, 8:52 AMorstavik77
04/19/2022, 8:54 AMoldschoolcurry
04/20/2022, 8:49 AMHello world
);
}kian
04/20/2022, 8:56 AMjs
export async function onRequestPost({request}) {
const myPostBody = await request.json();
console.log(myPostBody);
return new Response(Hello world);
}
kian
04/20/2022, 8:56 AM