Closed marbemac closed 9 years ago
Awesome, thanks for this :) Is there any chance you could write a test to cover this case?
All set! The tests I added follow a slightly different format, since in this case we're testing the request options, and in all the other cases we're testing the response.
Looks great! Thanks for contributing :smile: This should be hopefully released in a week or two
When the request body is a FormData object, Fetch automatically assigns the Content-Type header to "multipart/form-data; boundary={UNIQUE BOUNDARY TOKEN}". If Content-Type is already set, Fetch will not overwrite it. Thus, to support the multipart/form-data content-type, Marty should not automatically set the Content-Type to "application/json" when the request body is a FormData object.