in lib/src/http_impl.dart [843:932]
String _findReasonPhrase(int statusCode) {
if (_reasonPhrase != null) {
return _reasonPhrase;
}
switch (statusCode) {
case HttpStatus.CONTINUE:
return "Continue";
case HttpStatus.SWITCHING_PROTOCOLS:
return "Switching Protocols";
case HttpStatus.OK:
return "OK";
case HttpStatus.CREATED:
return "Created";
case HttpStatus.ACCEPTED:
return "Accepted";
case HttpStatus.NON_AUTHORITATIVE_INFORMATION:
return "Non-Authoritative Information";
case HttpStatus.NO_CONTENT:
return "No Content";
case HttpStatus.RESET_CONTENT:
return "Reset Content";
case HttpStatus.PARTIAL_CONTENT:
return "Partial Content";
case HttpStatus.MULTIPLE_CHOICES:
return "Multiple Choices";
case HttpStatus.MOVED_PERMANENTLY:
return "Moved Permanently";
case HttpStatus.FOUND:
return "Found";
case HttpStatus.SEE_OTHER:
return "See Other";
case HttpStatus.NOT_MODIFIED:
return "Not Modified";
case HttpStatus.USE_PROXY:
return "Use Proxy";
case HttpStatus.TEMPORARY_REDIRECT:
return "Temporary Redirect";
case HttpStatus.BAD_REQUEST:
return "Bad Request";
case HttpStatus.UNAUTHORIZED:
return "Unauthorized";
case HttpStatus.PAYMENT_REQUIRED:
return "Payment Required";
case HttpStatus.FORBIDDEN:
return "Forbidden";
case HttpStatus.NOT_FOUND:
return "Not Found";
case HttpStatus.METHOD_NOT_ALLOWED:
return "Method Not Allowed";
case HttpStatus.NOT_ACCEPTABLE:
return "Not Acceptable";
case HttpStatus.PROXY_AUTHENTICATION_REQUIRED:
return "Proxy Authentication Required";
case HttpStatus.REQUEST_TIMEOUT:
return "Request Time-out";
case HttpStatus.CONFLICT:
return "Conflict";
case HttpStatus.GONE:
return "Gone";
case HttpStatus.LENGTH_REQUIRED:
return "Length Required";
case HttpStatus.PRECONDITION_FAILED:
return "Precondition Failed";
case HttpStatus.REQUEST_ENTITY_TOO_LARGE:
return "Request Entity Too Large";
case HttpStatus.REQUEST_URI_TOO_LONG:
return "Request-URI Too Large";
case HttpStatus.UNSUPPORTED_MEDIA_TYPE:
return "Unsupported Media Type";
case HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE:
return "Requested range not satisfiable";
case HttpStatus.EXPECTATION_FAILED:
return "Expectation Failed";
case HttpStatus.INTERNAL_SERVER_ERROR:
return "Internal Server Error";
case HttpStatus.NOT_IMPLEMENTED:
return "Not Implemented";
case HttpStatus.BAD_GATEWAY:
return "Bad Gateway";
case HttpStatus.SERVICE_UNAVAILABLE:
return "Service Unavailable";
case HttpStatus.GATEWAY_TIMEOUT:
return "Gateway Time-out";
case HttpStatus.HTTP_VERSION_NOT_SUPPORTED:
return "Http Version not supported";
default:
return "Status $statusCode";
}
}