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
Http post not sending body on iOS #1343
Comments
/cc @collinjackson |
Can I get an ETA on this? |
Attempting to repro now. |
Current attempt: https://github.com/eseidelGoogle/repro_flutter_1343 |
Android is complaining with |
So I'm not yet able to get as far as @tejainece did. I wonder if there is a regression on master. |
OK. I have it working on Android. Checking iOS. Ran into #1345 (our iOS workflow still needs a ton of work). |
OK. I've confirmed this bug on iOS. See https://github.com/eseidelGoogle/repro_flutter_1343/blob/master/README.md |
Yup. It appears the iOS code doesn't use the body parameter at all. :/ https://github.com/flutter/engine/blob/master/sky/services/ns_net/url_loader_impl.mm So the real bug here is that we don't have any testing of our |
@chinmaygarde has offered to write the missing body code. I expect we'll have this fixed today. |
The android version only supports a single part body. We can do the same on iOS: |
I think Android is also hard-coding the content type which is wrong: |
I'm not sure this can be closed yet. There is still an issue of android hard-coding the content type which is causing android to post with 'form=' instead of 'data=' in this example. At least that's my understanding. Can you confirm @tejainece? |
I am sorry. I am in a training, so don't have access to my Linux and mac machines. Will test it as soon as i get back home on Thursday. Thanks for quick response. |
It doesn't work yet. It still sends empty body. Maybe I don't have the recent version. I did |
I am not able to reproduce this. Can you try removing the |
I am testing it on Android, not ios. But sure, I will try that. |
Working on Android now. Thanks :) |
Cool, thanks for testing! |
final Map<String,dynamic>userData={
'firstname': _firstNameField,
'lastname': _lastNameField,
'display_name': _userNameField,
'email': _emailField,
'password': _passwordField
};
final response = await http.post(url, body:json.encode(userData) ); I tried sending a post request but its sending an empty body to the server how do i resolve this |
@bennybat50 would you be willing to open a new bug with more info (e.g. your |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The body is empty.
PS: Also missing the cozy network tab in DevTools in chromium.
The text was updated successfully, but these errors were encountered: