Response.bytes constructor
Response.bytes(})
Create a new HTTP response with a byte array body.
Implementation
Response.bytes(List<int> bodyBytes, int statusCode,
{BaseRequest? request,
Map<String, String> headers = const {},
bool isRedirect = false,
bool persistentConnection = true,
String? reasonPhrase})
: bodyBytes = toUint8List(bodyBytes),
super(statusCode,
contentLength: bodyBytes.length,
request: request,
headers: headers,
isRedirect: isRedirect,
persistentConnection: persistentConnection,
reasonPhrase: reasonPhrase);