response function
JSON:API response
Implementation
Response response(int statusCode, {OutboundDocument? document}) {
final r = Response(
statusCode, document != null ? Body.json(document) : Body(), Headers());
if (document != null) {
r.headers['Content-Type'] = [mediaType];
}
return r;
}