title: How to make HTTP POST request with url encoded body in flutter?
body: <p>I'm trying to make an post request in flutter with content type as url encoded. When I write <code>body : json.encode(data)</code>, it encodes to plain text. </p>
  
  <p>If I write <code>body: data</code> I get the error <code>type '_InternalLinkedHashMap&lt;String, dynamic&gt;' is not a subtype of type 'String' in type cast</code></p>
  
  <p>This is the data object</p>
  
  <pre><code>var match = {
    "homeTeam": {"team": "Team A"},
    "awayTeam": {"team": "Team B"}
  };
  </code></pre>
  
  <p>And my request</p>
  
  <pre><code>var response = await post(Uri.parse(url),
      headers: {
        "Accept": "application/json",
        "Content-Type": "application/x-www-form-urlencoded"
      },
      body: match,
      encoding: Encoding.getByName("utf-8"));
  </code></pre>