CloudflareResponse.json constructor
CloudflareResponse.json(})
Provides the declared Cloudflare API member.
Implementation
factory CloudflareResponse.json(
Object? value, {
int status = 200,
Map<String, String> headers = const <String, String>{},
}) {
return CloudflareResponse(
body: jsonEncode(value),
status: status,
headers: <String, String>{
'content-type': 'application/json; charset=utf-8',
...headers,
},
);
}