Response<ValueType> constructor

Response<ValueType>({
  1. dynamic body,
  2. int statusCode = 200,
  3. Map<String, dynamic>? headers,
  4. String? mimeType,
  5. String? charset = kDefaultCharset,
  6. List<Cookie>? cookies,
})

Implementation

factory Response({
  dynamic body,
  int statusCode = 200,
  Map<String, dynamic>? headers,
  String? mimeType,
  String? charset = kDefaultCharset,
  List<Cookie>? cookies,
}) {
  return StringResponse(
      body: body?.toString(),
      statusCode: statusCode,
      headers: headers,
      mimeType: mimeType,
      charset: charset,
      cookies: cookies) as Response<ValueType>;
}