In "bb" variable all data show in json format when i debugged. but show this error "HTTP Error 400. The request hostname is invalid". This json data is working in Postman Please Help!!!!
void send() async { var bb=json.encode(listModel.toJson()); var response = await http.post(Uri.parse( "http://10.0.2.2:1066/api/Storedata/Add"), body: bb, headers: {"Content-type": "application/json"},); if (response.statusCode == 201) { print("Done"); } else { print(response.body); print(response.statusCode); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)