contentType property

String? contentType
getter/setter pair

The request Content-Type. The default value is ContentType.json. If you want to encode request body with 'application/x-www-form-urlencoded', you can set ContentType.parse('application/x-www-form-urlencoded'), and Dio will automatically encode the request body.

Implementation

String? contentType;