Response.json constructor
Response.json(
- dynamic data, {
- int status = 200,
Creates a JSON response with the provided data and status code.
Implementation
Response.json(dynamic data, {int status = 200})
: statusCode = status,
body = jsonEncode(data),
headers = _CaseInsensitiveMap({'content-type': 'application/json'}),
_cookies = [];