buildPOSTFormData method

String buildPOSTFormData(
  1. Map<String, String?> data, [
  2. Map<String, String>? requestHeaders
])

Implementation

String buildPOSTFormData(Map<String, String?> data,
    [Map<String, String>? requestHeaders]) {
  var formData = buildQueryString(data);

  if (requestHeaders != null) {
    requestHeaders.putIfAbsent(HttpRequest._headerKeyContentType,
        () => 'application/x-www-form-urlencoded; charset=UTF-8');
  }

  return formData;
}