title: How to make HTTP request to In Flutter Web
body: <p>I was trying my hands on flutter web. I tried to connect a simple flutter web app I created to mysql database and localhost using the http package. However I dont get any data returned from the request method. When I tried to print out <code>snaphot.error</code> I got this: <code>XMLHttpRequest error</code>. I have this method in a <code>FutureBuilder()</code></p>
  
  <pre><code>getMethod()async{
    String theUrl = 'https://localhost/fetchData.php';
    var res = await http.get(Uri.encodeFull(theUrl),headers: {"Accept":"application/json"});
    var responsBody = json.decode(res.body);
    print(responsBody);
    return responsBody;
  
  }
  </code></pre>