StringResponse.cloneFrom constructor

StringResponse.cloneFrom(
  1. Response response, {
  2. dynamic body,
  3. int? statusCode,
  4. String? mimeType,
  5. String? charset,
})

Implementation

factory StringResponse.cloneFrom(Response response,
    {dynamic body, int? statusCode, String? mimeType, String? charset}) {
  return StringResponse(
    body: body,
    statusCode: statusCode ?? response.statusCode,
    mimeType: mimeType,
    charset: charset,
    headers: response.headers.headers,
    cookies: response.cookies,
  );
}