HTTPRequest.fromJson constructor

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

Implementation

factory HTTPRequest.fromJson(Map<String, dynamic> json) {
  return HTTPRequest(
    clientIP: json['ClientIP'] as String?,
    country: json['Country'] as String?,
    hTTPVersion: json['HTTPVersion'] as String?,
    headers: (json['Headers'] as List?)
        ?.whereNotNull()
        .map((e) => HTTPHeader.fromJson(e as Map<String, dynamic>))
        .toList(),
    method: json['Method'] as String?,
    uri: json['URI'] as String?,
  );
}