matthew-andrews / isomorphic-fetch

Isomorphic WHATWG Fetch API, for Node & Browserify
MIT License
6.95k stars 289 forks source link

Get 400 response Bad Request Payload content length greater than maximum allowed: 1048576? #142

Closed 9tor closed 3 years ago

9tor commented 7 years ago

I find it very hard to find a proper example/documentation on how to increase payload maxBytes. I am trying to send my params in body JSON to the server, but even with more than 1 Mb I get Error: Payload content length greater than maximum allowed: 1048576

How can I increase the max payload size properly?

Thx in advance! :)

fetch(url,{ method: 'POST', body: JSON.stringify(params), headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': token }, })

matthew-andrews commented 3 years ago

I suspect this would be the sort of problem coming from the upstream projects (node-fetch or whatwg-fetch (or the native browser implementation … ) please check with those projects …