title: Http.HttpRequestException Xamarin.forms
body: <p>At the moment I am trying to simulate my Android application. The application developed is using xamarin.forms and works on both Android and iOS. </p>
  
  <p>My problem is when doing restful request using httpClient. At the moment I am using localhost. When running on iOS I have no problems, however Android returns the following exception:
  <a href="https://i.stack.imgur.com/9Ipw7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Ipw7.png" alt="enter image description here"></a> </p>
  
  <p>This is the code that makes the problem: </p>
  
  <pre><code>var request = new HttpRequestMessage(HttpMethod.Post, sharedURL.baseUrl + "connect/token");
  request.Content = new FormUrlEncodedContent(new Dictionary&lt;string, string&gt;
  {
      ["grant_type"] = "password",
      ["username"] = username,
      ["password"] = password,
      ["scope"] = "offline_access"
  });
  
  var response = await client.SendAsync(request, HttpCompletionOption.ResponseContentRead);
  </code></pre>
  
  <p>I believe it could have something to do with https, as my restfull services are not set up with https. However I am not able to disable this on Android. Any clues? </p>