export default {
async fetch(request, env, ctx) {
const r = new Request('https://example.com/', {
method: 'POST',
body: new URLSearchParams({ hello: 'world' })
});
return new Response(r.headers.get('content-type'))
},
};
Expected (ref):
application/x-www-form-urlencoded;charset=UTF-8
Actual:
This behavior differs from browsers and node.js
Replicated in cloudflare workers playground and in a production workers deployment.