HttpRoute.fromJson constructor

HttpRoute.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HttpRoute.fromJson(Map<String, dynamic> json) {
  return HttpRoute(
    action: HttpRouteAction.fromJson(json['action'] as Map<String, dynamic>),
    match: HttpRouteMatch.fromJson(json['match'] as Map<String, dynamic>),
    retryPolicy: json['retryPolicy'] != null
        ? HttpRetryPolicy.fromJson(
            json['retryPolicy'] as Map<String, dynamic>)
        : null,
    timeout: json['timeout'] != null
        ? HttpTimeout.fromJson(json['timeout'] as Map<String, dynamic>)
        : null,
  );
}