toJson method
dynamic
toJson()
Implementation
dynamic toJson() {
if (headers.contentType != ContentType.json) {
throw Exception('wrong content type: ${headers.contentType}');
}
return jsonDecode(toString());
}