toHttpResponse method

Response toHttpResponse()

Converts this response data to an HTTP response.

Implementation

Response toHttpResponse() {
  return Response.bytes(
    bodyBytes,
    statusCode,
    headers: headers!,
    persistentConnection: persistentConnection!,
    isRedirect: isRedirect!,
    request: request?.toHttpRequest(),
  );
}