Response.fromClient constructor Null safety
- HttpClientResponse clientResponse,
- dynamic body,
- {Map<
String, dynamic> ? originHeaders}
Maps the client response to Response
Implementation
factory Response.fromClient(HttpClientResponse clientResponse, body,
{Map<String, dynamic>? originHeaders}) {
return Response(
request: Request(
url: clientResponse.headers.host,
body: body,
headers: originHeaders,
),
statusCode: clientResponse.statusCode,
body: body,
connectionInfo: clientResponse.connectionInfo,
headers: clientResponse.headers);
}