title: POST error on Android
body: <p>I've got a problem when sending a POST request with this code on Android device.</p>
  
  <pre><code>import 'dart:async';
  import 'dart:convert';
  import 'package:http/http.dart' as http;
  
  class NetworkUtil {
    // next three lines makes this class a Singleton
    static NetworkUtil _instance = new NetworkUtil.internal();
    NetworkUtil.internal();
    factory NetworkUtil() =&gt; _instance;
  
    final JsonDecoder _decoder = new JsonDecoder();
    static final baseURL = "https://myurl.com";
  
    Future&lt;dynamic&gt; get(String url) {
      return http.get(baseURL+url).then((http.Response response) {
        final String res = response.body;
        final int statusCode = response.statusCode;
  
        if (statusCode &lt; 200 || statusCode &gt; 400 || json == null) {
          throw new Exception("Error while fetching data");
        }
        return _decoder.convert(res);
      });
    }
  
    Future&lt;dynamic&gt; post(String url, {Map headers, body, encoding}) {
      return http
          .post(baseURL+url, body: body, headers: headers, encoding: encoding)
          .then((http.Response response) {
        final String res = response.body;
        final int statusCode = response.statusCode;
  
        if (statusCode &lt; 200 || statusCode &gt; 400 || json == null) {
          throw new Exception("Error while fetching data");
        }
        return _decoder.convert(res);
      });
    }
  }
  </code></pre>
  
  <p>It throws an error</p>
  
  <pre><code> Instance of 'Future'
  E/flutter (13631): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
  E/flutter (13631): HandshakeException: Handshake error in client (OS Error: 
  E/flutter (13631):  CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:363))
  E/flutter (13631): #0      IOClient.send (package:http/src/io_client.dart:30:23)
  E/flutter (13631): &lt;asynchronous suspension&gt;
  E/flutter (13631): #1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:171:38)
  E/flutter (13631): &lt;asynchronous suspension&gt;
  E/flutter (13631): #2      BaseClient.post (package:http/src/base_client.dart:56:5)
  E/flutter (13631): #3      post.&lt;anonymous closure&gt; (package:http/http.dart:70:34)
  E/flutter (13631): #4      _withClient (package:http/http.dart:167:20)
  E/flutter (13631): &lt;asynchronous suspension&gt;
  E/flutter (13631): #5      post (package:http/http.dart:70:3)
  E/flutter (13631): #6      NetworkUtil.post (package:queue/class/network_util.dart:28:10)
  E/flutter (13631): #7      MakeVerifyTelephoneButtonState._submitPressed (file:///Users/skulltree/Documents/TwinSynergyProjects/crossPlatform/manaqueue/lib/ui/verifybutton.dart:29:27)
  E/flutter (13631): #8      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
  E/flutter (13631): #9      TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
  E/flutter (13631): #10     TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
  E/flutter (13631): #11     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
  E/flutter (13631): #12     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
  E/flutter (13631): #13     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
  E/flutter (13631): #14     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
  E/flutter (13631): #15     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
  E/flutter (13631): #16     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
  E/flutter (13631): #17     _invoke1 (dart:ui/hooks.dart:134:13)
  E/flutter (13631): #18     _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
  </code></pre>
  
  <p>However, With the same code, it runs fine on iOS devices. Is it possible that there's something I missing to configure on Android Studio or anything else.</p>