Click here to Skip to main content
15,672,471 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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!!!!

What I have tried:

void send() async
var bb=json.encode(listModel.toJson());
    var response = await
      body: bb,
     headers: {"Content-type": "application/json"},);
if (response.statusCode == 201)
Updated 20-Oct-22 0:41am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900