How to modify FormData on a POST?

For Workers & Pages, what is the name of the domain?

darkedges.au

What is the issue or error you’re encountering

unable to modify POST FormData

What steps have you taken to resolve the issue?

I am trying to modify the Form Data Payload of a POST Request as the data needs to be changed as it goes through the proxy.

I have tried

 body = await request.formData()
body.set('redirect_uri', body.get('redirect_uri').replaceAll(`${CLOUDFLARE_SCHEME}://${CLOUDFLARE_HOST}${CLOUDFLARE_PORT}`, `${H_SCHEME}://${H_HOST}`))
response = await fetch(`https://${HOST}${pathname}`, {
			headers: request.headers,
			body: body,
			method: request.method,
			redirect: 'manual'
		})

leads to no form data being sent to backend server.

If I take out the code and lost the body I get

ReadableStream {
  locked: false,
  [state]: 'readable',
  [supportsBYOB]: true,
  [length]: 313n
}

So I am assuming what I am sending in the fetch is incorrect.

Any ideas?