WebSocketResponse.fromJson constructor
WebSocketResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory WebSocketResponse.fromJson(Map<String, dynamic> json) {
return WebSocketResponse(
status: json['status'] as int,
statusText: json['statusText'] as String,
headers: Headers.fromJson(json['headers'] as Map<String, dynamic>),
headersText:
json.containsKey('headersText')
? json['headersText'] as String
: null,
requestHeaders:
json.containsKey('requestHeaders')
? Headers.fromJson(json['requestHeaders'] as Map<String, dynamic>)
: null,
requestHeadersText:
json.containsKey('requestHeadersText')
? json['requestHeadersText'] as String
: null,
);
}