Closed wyattjoh closed 1 year ago
Note that this further only sends down the parameters used by fetch
, noteably not the url
. It also ensures that the Content-Type
header is not set on the upstream object, and is only sent to fetch
if the body
is being sent (it is a POST
request and not form data).
When a middleware changes the
req.fetchOpts.method
toGET
, at the moment, it will try to send thebody
parameter down tofetch
which causes an error:This change ensures that requests sent as
GET
will not include thebody
.