on this line, the typeof request.body === 'object' check returns true for FormData from undici and form-data. Resulting in a body of "{}" being sent, with content-type: application/json; charset=utf-8
I think there's a few potential solutions here:
Check the content-type, and if it's set, do not attempt to coerce to JSON.
Check the json property in Request to be exactly false. This property doesn't appear to be used?
Check instanceof FormData from undici, I don't think this is a great option but it's an option.
on this line, the
typeof request.body === 'object'
check returns true forFormData
fromundici
andform-data
. Resulting in a body of"{}"
being sent, withcontent-type: application/json; charset=utf-8
I think there's a few potential solutions here:
content-type
, and if it's set, do not attempt to coerce to JSON.json
property inRequest
to be exactlyfalse
. This property doesn't appear to be used?instanceof FormData
fromundici
, I don't think this is a great option but it's an option.