bodyBytes property

Uint8List bodyBytes

The bytes comprising the body of the request.

This is converted to and from body using encoding.

This list should only be set, not modified in place.

Unlike body, setting bodyBytes does not implicitly set a Content-Type header.

final request = Request('GET', Uri.https('', 'whatsit/create'))
  ..bodyBytes = utf8.encode(jsonEncode({}))
  ..headers['content-type'] = 'application/json';


Uint8List get bodyBytes => _bodyBytes;
void bodyBytes=(List<int> value)


set bodyBytes(List<int> value) {
  _bodyBytes = toUint8List(value);