json method
JSON-encodes body and sets content-type.
Implementation
void json(Object body) {
_headers['content-type'] = 'application/json';
_body = jsonEncode(body);
}
JSON-encodes body and sets content-type.
void json(Object body) {
_headers['content-type'] = 'application/json';
_body = jsonEncode(body);
}