statusText function

String statusText(
  1. int code
)

Implementation

String statusText(int code) {
  switch (code) {
    case HttpStatus.continue_:
      return 'Continue';
    case HttpStatus.switchingProtocols:
      return 'Switching Protocols';
    case HttpStatus.processing:
      return 'Processing';
    case HttpStatus.earlyHints:
      return 'Early Hints';
    case HttpStatus.ok:
      return 'OK';
    case HttpStatus.created:
      return 'Created';
    case HttpStatus.accepted:
      return 'Accepted';
    case HttpStatus.nonAuthoritativeInfo:
      return 'Non-Authoritative Information';
    case HttpStatus.noContent:
      return 'No Content';
    case HttpStatus.resetContent:
      return 'Reset Content';
    case HttpStatus.partialContent:
      return 'Partial Content';
    case HttpStatus.multiStatus:
      return 'Multi-Status';
    case HttpStatus.alreadyReported:
      return 'Already Reported';
    case HttpStatus.imUsed:
      return 'IM Used';
    case HttpStatus.multipleChoices:
      return 'Multiple Choices';
    case HttpStatus.movedPermanently:
      return 'Moved Permanently';
    case HttpStatus.found:
      return 'Found';
    case HttpStatus.seeOther:
      return 'See Other';
    case HttpStatus.notModified:
      return 'Not Modified';
    case HttpStatus.useProxy:
      return 'Use Proxy';
    case HttpStatus.temporaryRedirect:
      return 'Temporary Redirect';
    case HttpStatus.permanentRedirect:
      return 'Permanent Redirect';
    case HttpStatus.badRequest:
      return 'Bad Request';
    case HttpStatus.unauthorized:
      return 'Unauthorized';
    case HttpStatus.paymentRequired:
      return 'Payment Required';
    case HttpStatus.forbidden:
      return 'Forbidden';
    case HttpStatus.notFound:
      return 'Not Found';
    case HttpStatus.methodNotAllowed:
      return 'Method Not Allowed';
    case HttpStatus.notAcceptable:
      return 'Not Acceptable';
    case HttpStatus.proxyAuthRequired:
      return 'Proxy Authentication Required';
    case HttpStatus.requestTimeout:
      return 'Request Timeout';
    case HttpStatus.conflict:
      return 'Conflict';
    case HttpStatus.gone:
      return 'Gone';
    case HttpStatus.lengthRequired:
      return 'Length Required';
    case HttpStatus.preconditionFailed:
      return 'Precondition Failed';
    case HttpStatus.requestEntityTooLarge:
      return 'Request Entity Too Large';
    case HttpStatus.requestURITooLong:
      return 'Request URI Too Long';
    case HttpStatus.unsupportedMediaType:
      return 'Unsupported Media Type';
    case HttpStatus.requestedRangeNotSatisfiable:
      return 'Requested Range Not Satisfiable';
    case HttpStatus.expectationFailed:
      return 'Expectation Failed';
    case HttpStatus.teapot:
      return "I'm a teapot";
    case HttpStatus.misdirectedRequest:
      return 'Misdirected Request';
    case HttpStatus.unprocessableEntity:
      return 'Unprocessable Entity';
    case HttpStatus.locked:
      return 'Locked';
    case HttpStatus.failedDependency:
      return 'Failed Dependency';
    case HttpStatus.tooEarly:
      return 'Too Early';
    case HttpStatus.upgradeRequired:
      return 'Upgrade Required';
    case HttpStatus.preconditionRequired:
      return 'Precondition Required';
    case HttpStatus.tooManyRequests:
      return 'Too Many Requests';
    case HttpStatus.requestHeaderFieldsTooLarge:
      return 'Request Header Fields Too Large';
    case HttpStatus.unavailableForLegalReasons:
      return 'Unavailable For Legal Reasons';
    case HttpStatus.internalServerError:
      return 'Internal Server Error';
    case HttpStatus.notImplemented:
      return 'Not Implemented';
    case HttpStatus.badGateway:
      return 'Bad Gateway';
    case HttpStatus.serviceUnavailable:
      return 'Service Unavailable';
    case HttpStatus.gatewayTimeout:
      return 'Gateway Timeout';
    case HttpStatus.httpVersionNotSupported:
      return 'HTTP Version Not Supported';
    case HttpStatus.variantAlsoNegotiates:
      return 'Variant Also Negotiates';
    case HttpStatus.insufficientStorage:
      return 'Insufficient Storage';
    case HttpStatus.loopDetected:
      return 'Loop Detected';
    case HttpStatus.notExtended:
      return 'Not Extended';
    case HttpStatus.networkAuthenticationRequired:
      return 'Network Authentication Required';
    default:
      return '';
  }
}