ClientException in io_client.dart

393 views Asked by At

The code below works started giving trouble when the back-end server is switched from HTTP to HTTPS. The back-end application is written in .NET and runs on IIS 10.0

response = await http.post(
          Uri.encodeFull("https://_____________/api/account/login"),
          body: json.encode(body),
          headers: {
            "Accept": "application/json",
            "Content-Type": "application/json"
            // ignore: missing_return
          }).timeout(Duration(seconds: 10), onTimeout: () {
        throw ('You seem to be offline');
      });
      if (response.statusCode == 500) {
         .......

See the screenshot below for exact exception. Interestingly, there's no exception message.

enter image description here

The code works well on other HTTPS back-end such as MS Azure hosted APIs. The API call works well in the Postman.

Can anyone help ?

EDIT : Found a related github issue

0

There are 0 answers