title: Flutter SocketException: OS Error: No route to host, errno = 113, address = xxxx, port = 42376
body: <p>I received this error </p>
  
  <pre><code>Unhandled Exception: SocketException: OS Error: No route to host,
  errno = 113, address = (my url api), port = 42392
  </code></pre>
  
  <p>while trying to access it with this code:</p>
  
  <pre><code>final String basicAuth = 'Basic ' + base64Encode(utf8.encode('$authUsername:$authPassword'));
  final String _grantType = "password";
  
  http.Response response = await http.post(
    Uri.encodeFull("this is my url api"),
    headers: &lt;String, String&gt;{
      "authorization": basicAuth,
      'content-type': 'application/x-www-form-urlencoded',
    },
    body: {
      "username": username,
      "password": password,
      "grant_type": _grantType,
    },
  );
  </code></pre>
  
  <p>I've tried the URL using postman and work perfectly, did I write it correctly?  I'm not sure about placing authorization basic auth code</p>