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.
|
||||
void json(value) => this
|
||||
..contentType = MediaType('application', 'json')
|
||||
..serialize(value);
|
||||
Future<bool> json(value) =>
|
||||
this.serialize(value, contentType: MediaType('application', 'json'));
|
||||
|
||||
/// Returns a JSONP response.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue