reqwest
reqwest copied to clipboard
Firefox doesn't set content type correctly if set in the headers object.
Given the following code:
reqwest({
url: '/test',
method: 'PUT',
data: JSON.stringify({obj: true}),
headers: {
'Content-Type': 'application/json'
}
});
This properly sets the content-type in chrome. But not in firefox. Thus, the server will improperly parse the params. It works fine if I set the contentType: 'application/json'
. So you should look at both locations to set the header.