Reputation: 3964
this is what i tried:
Future<User> guestLogin(String deviceID) async {
var body = {
"deviceid": deviceID,
};
var bodyEncoded = json.encode(body);
Response response = await client.post(
"$_baseURL/api/user/guest",
body: bodyEncoded,
headers: {"Content-Type": "application/json"},
);
return User.fromJson(json.decode(response.body));
}
but when i check it from serverside which coded by golang then i see that the body is empty. when i try it on postman its working well. Where is the problem?
Upvotes: 0
Views: 170