decode static method
Implementation
static ApiHttpRequest? decode(dynamic json) {
if (json == null) {
return null;
}
if (json is! Map<String, dynamic>) {
return null;
}
return ApiHttpRequest(
url: StringDecoder.decode(json['url']),
method: ApiHttpRequestMethodExtension.decode(json['method']),
headers: ListDecoder.decode(
json['headers'], (element) => ApiHttpHeader.decode(element)),
body: StringDecoder.decode(json['body']),
);
}