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