The solution to the problem is to explicitly set Content-Type
to undefined
so that your browser or whatever client you’re using can set it and add that boundary value in there for you. Disappointing but true.
More Related Contents:
- Fetch API vs XMLHttpRequest
- FormData in IE8/9
- Intercept fetch() API requests and responses in JavaScript
- Hide 401 console.error in chrome dev tools getting 401 on fetch() call [duplicate]
- set withCredentials to the new ES6 built-in HTTP request API : Fetch
- Trying to use fetch and pass in mode: no-cors
- Origin null is not allowed by Access-Control-Allow-Origin
- Allow Google Chrome to use XMLHttpRequest to load a URL from a local file
- Add a “hook” to all AJAX requests on a page
- Error when accessing API with fetch while setting mode to ‘no-cors’ [duplicate]
- What is the cleanest way to get the progress of JQuery ajax request?
- How do I POST with multipart form data using fetch?
- Why am I seeing an “origin is not allowed by Access-Control-Allow-Origin” error here? [duplicate]
- Is onload equal to readyState==4 in XMLHttpRequest?
- What do the different readystates in XMLHttpRequest mean, and how can I use them?
- Catching an Access-Control-Allow-Origin error in JavaScript
- Returning HTML With fetch()
- using a fetch inside another fetch in javascript
- fetch() unexpected end of input
- “not well-formed” error in Firefox when loading JSON file with XMLHttpRequest
- “getElementById not a function” when trying to parse an AJAX response?
- Get HTML code using JavaScript with a URL
- Is it possible for XHR HEAD requests to not follow redirects (301 302)
- Cannot load Deezer API resources from localhost with the Fetch API
- XMLHttpRequest 206 Partial Content
- how to process fetch response from an ‘opaque’ type?
- Ajax – 500 Internal Server Error
- fetch retry request (on failure)
- UseEffect being called multiple times
- Intercept XMLHttpRequest and modify responseText