Jonny Borges
Committed by GitHub

Merge pull request #1452 from calvingit/bug-fixed

Add content type and length into the headers when the content type is 'application/x-www-form-urlencoded'
... ... @@ -115,6 +115,8 @@ class GetHttpClient {
});
var formData = parts.join('&');
bodyBytes = utf8.encode(formData);
headers['content-length'] = bodyBytes.length.toString();
headers['content-type'] = contentType;
} else if (body is Map || body is List) {
var jsonString = json.encode(body);
... ...