textResponse function

Response textResponse(
  1. String text, {
  2. int status = 200,
})

Text response helper

Implementation

shelf.Response textResponse(
  String text, {
  int status = 200,
}) {
  return shelf.Response(
    status,
    headers: {'Content-Type': 'text/plain; charset=utf-8'},
    body: text,
  );
}