bodyType property
Body type is a combination of mimeType and encoding.
For incoming requests, this is populated from the request content type header.
For outgoing responses, this field is used to create the content type header.
This will be null if the body is empty.
This is a convenience property that combines mimeType and encoding.
Example:
var body = Body.fromString('hello', mimeType: MimeType.plainText);
print(body.contentType); // ContentType(text/plain; charset=utf-8)
Implementation
final BodyType? bodyType;