multipart != application/x-www-form-urlencoded
See original GitHub issueOn iOS i don’t have any problems.
Running the app for the first time on Android.
Two times I do a fetch:
const data = new FormData();
......
fetch('........', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: data
})
Can’t find anything about this error…
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
application/x-www-form-urlencoded or multipart/form-data?
In HTTP there are two ways to POST data: application/x-www-form-urlencoded and multipart/form-data . I understand that most browsers are only able to upload ......
Read more >Difference between application/x-www-form-urlencoded and ...
4) The x-www-form-urlencoded is used more generally to send text data to the server while multipart/form-data is used to send binary data, most...
Read more >Difference Between form-data, x-www-form-urlencoded and ...
Form -data represents the data sent from website forms to APIs as part of multipart/form-data. The form-data option in Postman simulates filling ...
Read more >POST - HTTP - MDN Web Docs
application /x-www-form-urlencoded : the keys and values are encoded in key-value ... A form using the multipart/form-data content type:.
Read more >'x-www-form-urlencoded' or 'form-data' ? Explained in 2 mins.
form -data is a fancier way of encoding data than x-www-form-urlencoded . You can think of x-www-form-urlencoded as .txt file and form-data as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran across this same issue. I was able to get around it by changing the
Content-Type
header.When I was getting the error I had:
And when I switched it to this it worked:
Hope this helps anyone else who runs into this issue later on.
Hi, as @jasonmerino said, you have to set ‘Content-Type’: ‘multipart/form-data’ and specify the type of your file like this:
const data = new FormData(); data.append('image', { uri: source, name: 'image', type: 'image/png' });