response function

Response response(
  1. int statusCode, {
  2. OutboundDocument? document,
})

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;
}