ForwardedResponseDetails.fromJson constructor

ForwardedResponseDetails.fromJson(
  1. Object? json
)

Implementation

factory ForwardedResponseDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return ForwardedResponseDetails(
    body: (map['body'] as String),
    headers: (map['headers'] as List<Object?>)
        .map((el) => ForwardedRequestHeader.fromJson(el))
        .toList(),
    status: (map['status'] as num).toInt(),
  );
}