title: i am going to run localhost .net api in flutter to get data from it but i got a lot of errors
body: <p>I am going to run localhost .net API in a flutter to get data from it but I got a lot of errors. why.net API is locally hosted. I want to run a local web API I don't want to host it on a live server.</p>
  <p>here is code</p>
  <pre><code>static Future fectchCordinates() async
  {
      HttpClient client = new HttpClient();
      client.badCertificateCallback = ((X509Certificate cert, String host, int port) =&gt; true);
      var studentUrl =Uri.parse('https://10.0.2.2:44363/address-lookup?address=house%20no%20122%20');
      //Uri.parse(studentUrl),
      print(studentUrl);
      http.Response response=await http.get(studentUrl,headers: {&quot;Accept&quot;: &quot;application/json&quot;});
      print(response.body);
      return response;
  } 
  </code></pre>
  <blockquote>
  <p>E/flutter ( 8373): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
  <br>    E/flutter ( 8373):  CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:393))
  <br>    E/flutter ( 8373): #0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99:46)
  <br>    E/flutter ( 8373): #1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142:25)
  <br>    E/flutter ( 8373): #2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:911:54)
  <br>    E/flutter ( 8373): #3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1040:19)
  <br>    E/flutter ( 8373): 
  <br>    E/flutter ( 8373):</p>
  </blockquote>