Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native http Fetch POST/PUT not working on android AVD #12094

Closed
TyrealGray opened this issue Jan 27, 2017 · 5 comments
Closed

React Native http Fetch POST/PUT not working on android AVD #12094

TyrealGray opened this issue Jan 27, 2017 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@TyrealGray
Copy link

TyrealGray commented Jan 27, 2017

Working on this one and I have no idea.
iOS is working fine, and GET method is working also fine on android AVD as well.
But POST/PUT/DELETE is not working.
I checked all the methods on Postman also works.

fetch(Config.api, {
method: 'POST',//PUT
headers: {
'Content-Type': 'application/json',
'Authorization': 'XXXXXXXXXXX'
},
body: JSON.stringify(data))
  • React Native version: 0.37.0
  • Platform: Android
  • Operating System: MacOS 10.11.6
@athmangude
Copy link

What's your API Level for the AVD?

@TyrealGray
Copy link
Author

Level 23

@athmangude
Copy link

I also am also experiencing this issue on devices running android < 5. But emulators run fine

@TyrealGray TyrealGray changed the title React Native http Fetch POST/PUT/DELETE not working on android AVD React Native http Fetch POST/PUT not working on android AVD Jan 30, 2017
@TyrealGray
Copy link
Author

@athmangude my issue seems to be like that if the request has a body, it will not work

@TyrealGray
Copy link
Author

@athmangude I finally found out the problem, #8237. Our server does not prepare api for "utf-8", and android avd sent requests with "charset=utf-8". So it cause 500 status error.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants