toHttpResponse method
Implementation
HttpResponse toHttpResponse() {
return HttpResponse(
createdAt: DateTime.now().millisecondsSinceEpoch,
responseHeader: headers.map,
contentType: headers.map['content-type']?.first ?? 'Unknown',
responseBody: _jsonUtil.encodeRawJson(data),
responseStatusCode: statusCode,
responseStatusMessage: statusMessage,
responseSize: _byteUtil.stringToBytes(data.toString()),
requestHashCode: requestOptions.hashCode,
);
}