Fetch adds charset=utf-8 on Android but not on iOS
See original GitHub issueThis fetch request sends “application/json” as ContentType on IOS but “application/json; charset=utf-8” on Android:
fetch(url, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
}
})
The server I’m working against requires application/json and fails when charset is added. I’ve filed a bug report with them too, but shouldn’t fetch behave identically on ios and android?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:15
- Comments:38 (4 by maintainers)
Top Results From Across the Web
React Native Fetch on Android will not pass options
So I finally figured it out. Android is appending 'charset=utf-8' to the Content-Type. Making it 'Content-Type: 'application/json; ...
Read more >The Script element - HTML: HyperText Markup Language
This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected ......
Read more >Google Sign-In for server-side apps | Authentication
Keep your client secret secret! Implementing the one-time-code flow. The Google Sign-In button provides both an access token and an authorization code ...
Read more >Fetch Standard
At a high level, fetching a resource is a fairly simple operation. A request goes in, a response comes out. The details of...
Read more >Email Encoding: Setting Content-Type and HTML Spcecial ...
You can set your entire email to use UTF-8 character encoding, ... Just paste in your special characters and symbols, hit a button,...
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 Free
Top 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
To resolve this problem, use lib axios https://github.com/qiangmao/axios
Please don’t close, this is still an issue in latest RN