title: Flutter HTTP Post returns 415
body: <p>I have an issue with using <code>Method.Post</code> on my flutter app using <code>http</code> dart library.  It seems that when I tried to post data from my WebAPI it gaves me a <code>StatusCode 415</code>.  See my code below:</p>
  
  <p>Code Login:</p>
  
  <pre><code>Future&lt;User&gt; login(User user) async {
  print(URLRequest.URL_LOGIN);
  return await _netUtil.post(Uri.encodeFull(URLRequest.URL_LOGIN), body: {
    'username': user.username,
    'password': user.password
  }, headers: {
    "Accept": "application/json",
  }).then((dynamic res) {
    print(res.toString());
  });
  }
  </code></pre>
  
  <p>Code NetworkUtils:</p>
  
  <pre><code>Future&lt;dynamic&gt; post(String url, {Map headers, body, encoding}) async {
  return await http
      .post(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>Does anyone knew whats going on my code?</p>