Merge pull request #15 from debuggerx01/fix_res_json
Fixed res.json() causing 'Bad state: Cannot modify a closed...'
This commit is contained in:
commit
5e3abdad74
1 changed files with 2 additions and 3 deletions
|
@ -169,9 +169,8 @@ abstract class ResponseContext<RawResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Serializes JSON to the response.
|
/// Serializes JSON to the response.
|
||||||
void json(value) => this
|
Future<bool> json(value) =>
|
||||||
..contentType = MediaType('application', 'json')
|
this.serialize(value, contentType: MediaType('application', 'json'));
|
||||||
..serialize(value);
|
|
||||||
|
|
||||||
/// Returns a JSONP response.
|
/// Returns a JSONP response.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue