contentType method

String contentType()

请求的Content-Type,默认值是"application/json; charset=utf-8". 如果您想以"application/x-www-form-urlencoded"格式编码请求数据, 可以设置此选项为 Headers.formUrlEncodedContentType, 这样Dio 就会自动编码请求体.

Implementation

String contentType() {
  return Headers.formUrlEncodedContentType;
}