sendBytes method

void sendBytes(
  1. List<int> bytes, {
  2. String contentType = 'application/octet-stream',
})

Sends binary data.

Implementation

void sendBytes(
  List<int> bytes, {
  String contentType = 'application/octet-stream',
}) {
  if (_sent) return;

  _headers.setContentTypeString(contentType);
  _response.add(bytes);
  _closeResponse();
}