StatusCode enum

HTTP status code

Inheritance
Available extensions

Values

CONTINUE → const StatusCode

100 Continue [RFC7231, Section 6.2.1]

const StatusCode(100, 'Continue')
SWITCHING_PROTOCOLS → const StatusCode

101 Switching Protocols [RFC7231, Section 6.2.2]

const StatusCode(101, 'Switching Protocols')
PROCESSING → const StatusCode

102 Processing [RFC2518]

const StatusCode(102, 'Processing')
OK → const StatusCode

200 OK [RFC7231, Section 6.3.1]

const StatusCode(200, 'OK')
CREATED → const StatusCode

201 Created [RFC7231, Section 6.3.2]

const StatusCode(201, 'Created')
ACCEPTED → const StatusCode

202 Accepted [RFC7231, Section 6.3.3]

const StatusCode(202, 'Accepted')
NON_AUTHORITATIVE_INFORMATION → const StatusCode

203 Non-Authoritative Information [RFC7231, Section 6.3.4]

const StatusCode(203, 'Non Authoritative Information')
NO_CONTENT → const StatusCode

204 No Content [RFC7231, Section 6.3.5]

const StatusCode(204, 'No Content')
RESET_CONTENT → const StatusCode

205 Reset Content [RFC7231, Section 6.3.6]

const StatusCode(205, 'Reset Content')
PARTIAL_CONTENT → const StatusCode

206 Partial Content [RFC7233, Section 4.1]

const StatusCode(206, 'Partial Content')
MULTI_STATUS → const StatusCode

207 Multi-Status [RFC4918]

const StatusCode(207, 'Multi-Status')
ALREADY_REPORTED → const StatusCode

208 Already Reported [RFC5842]

const StatusCode(208, 'Already Reported')
IM_USED → const StatusCode

226 IM Used [RFC3229]

const StatusCode(226, 'IM Used')
MULTIPLE_CHOICES → const StatusCode

300 Multiple Choices [RFC7231, Section 6.4.1]

const StatusCode(300, 'Multiple Choices')
MOVED_PERMANENTLY → const StatusCode

301 Moved Permanently [RFC7231, Section 6.4.2]

const StatusCode(301, 'Moved Permanently')
FOUND → const StatusCode

302 Found [RFC7231, Section 6.4.3]

const StatusCode(302, 'Found')
SEE_OTHER → const StatusCode

303 See Other [RFC7231, Section 6.4.4]

const StatusCode(303, 'See Other')
NOT_MODIFIED → const StatusCode

304 Not Modified [RFC7232, Section 4.1]

const StatusCode(304, 'Not Modified')
USE_PROXY → const StatusCode

305 Use Proxy [RFC7231, Section 6.4.5]

const StatusCode(305, 'Use Proxy')
TEMPORARY_REDIRECT → const StatusCode

307 Temporary Redirect [RFC7231, Section 6.4.7]

const StatusCode(307, 'Temporary Redirect')
PERMANENT_REDIRECT → const StatusCode

308 Permanent Redirect [RFC7238]

const StatusCode(308, 'Permanent Redirect')
BAD_REQUEST → const StatusCode

400 Bad Request [RFC7231, Section 6.5.1]

const StatusCode(400, 'Bad Request')
UNAUTHORIZED → const StatusCode

401 Unauthorized [RFC7235, Section 3.1]

const StatusCode(401, 'Unauthorized')
PAYMENT_REQUIRED → const StatusCode

402 Payment Required [RFC7231, Section 6.5.2]

const StatusCode(402, 'Payment Required')
FORBIDDEN → const StatusCode

403 Forbidden [RFC7231, Section 6.5.3]

const StatusCode(403, 'Forbidden')
NOT_FOUND → const StatusCode

404 Not Found [RFC7231, Section 6.5.4]

const StatusCode(404, 'Not Found')
METHOD_NOT_ALLOWED → const StatusCode

405 Method Not Allowed [RFC7231, Section 6.5.5]

const StatusCode(405, 'Method Not Allowed')
NOT_ACCEPTABLE → const StatusCode

406 Not Acceptable [RFC7231, Section 6.5.6]

const StatusCode(406, 'Not Acceptable')
PROXY_AUTHENTICATION_REQUIRED → const StatusCode

407 Proxy Authentication Required [RFC7235, Section 3.2]

const StatusCode(407, 'Proxy Authentication Required')
REQUEST_TIMEOUT → const StatusCode

408 Request Timeout [RFC7231, Section 6.5.7]

const StatusCode(408, 'Request Timeout')
CONFLICT → const StatusCode

409 Conflict [RFC7231, Section 6.5.8]

const StatusCode(409, 'Conflict')
GONE → const StatusCode

410 Gone [RFC7231, Section 6.5.9]

const StatusCode(410, 'Gone')
LENGTH_REQUIRED → const StatusCode

411 Length Required [RFC7231, Section 6.5.10]

const StatusCode(411, 'Length Required')
PRECONDITION_FAILED → const StatusCode

412 Precondition Failed [RFC7232, Section 4.2]

const StatusCode(412, 'Precondition Failed')
PAYLOAD_TOO_LARGE → const StatusCode

413 Payload Too Large [RFC7231, Section 6.5.11]

const StatusCode(413, 'Payload Too Large')
URI_TOO_LONG → const StatusCode

414 URI Too Long [RFC7231, Section 6.5.12]

const StatusCode(414, 'URI Too Long')
UNSUPPORTED_MEDIA_TYPE → const StatusCode

415 Unsupported Media Type [RFC7231, Section 6.5.13]

const StatusCode(415, 'Unsupported Media Type')
RANGE_NOT_SATISFIABLE → const StatusCode

416 Range Not Satisfiable [RFC7233, Section 4.4]

const StatusCode(416, 'Range Not Satisfiable')
EXPECTATION_FAILED → const StatusCode

417 Expectation Failed [RFC7231, Section 6.5.14]

const StatusCode(417, 'Expectation Failed')
IM_A_TEAPOT → const StatusCode

418 I'm a teapot [curiously not registered by IANA but RFC2324]

const StatusCode(418, "I'm a teapot")
MISDIRECTED_REQUEST → const StatusCode

421 Misdirected Request RFC7540, Section 9.1.2

const StatusCode(421, 'Misdirected Request')
UNPROCESSABLE_ENTITY → const StatusCode

422 Unprocessable Entity [RFC4918]

const StatusCode(422, 'Unprocessable Entity')
LOCKED → const StatusCode

423 Locked [RFC4918]

const StatusCode(423, 'Locked')
FAILED_DEPENDENCY → const StatusCode

424 Failed Dependency [RFC4918]

const StatusCode(424, 'Failed Dependency')
UPGRADE_REQUIRED → const StatusCode

426 Upgrade Required [RFC7231, Section 6.5.15]

const StatusCode(426, 'Upgrade Required')
PRECONDITION_REQUIRED → const StatusCode

428 Precondition Required [RFC6585]

const StatusCode(428, 'Precondition Required')
TOO_MANY_REQUESTS → const StatusCode

429 Too Many Requests [RFC6585]

const StatusCode(429, 'Too Many Requests')
REQUEST_HEADER_FIELDS_TOO_LARGE → const StatusCode

431 Request Header Fields Too Large [RFC6585]

const StatusCode(431, 'Request Header Fields Too Large')

451 Unavailable For Legal Reasons [RFC7725]

const StatusCode(451, 'Unavailable For Legal Reasons')
INTERNAL_SERVER_ERROR → const StatusCode

500 Internal Server Error [RFC7231, Section 6.6.1]

const StatusCode(500, 'Internal Server Error')
NOT_IMPLEMENTED → const StatusCode

501 Not Implemented [RFC7231, Section 6.6.2]

const StatusCode(501, 'Not Implemented')
BAD_GATEWAY → const StatusCode

502 Bad Gateway [RFC7231, Section 6.6.3]

const StatusCode(502, 'Bad Gateway')
SERVICE_UNAVAILABLE → const StatusCode

503 Service Unavailable [RFC7231, Section 6.6.4]

const StatusCode(503, 'Service Unavailable')
GATEWAY_TIMEOUT → const StatusCode

504 Gateway Timeout [RFC7231, Section 6.6.5]

const StatusCode(504, 'Gateway Timeout')
HTTP_VERSION_NOT_SUPPORTED → const StatusCode

505 HTTP Version Not Supported [RFC7231, Section 6.6.6]

const StatusCode(505, 'HTTP Version Not Supported')
VARIANT_ALSO_NEGOTIATES → const StatusCode

506 Variant Also Negotiates [RFC2295]

const StatusCode(506, 'Variant Also Negotiates')
INSUFFICIENT_STORAGE → const StatusCode

507 Insufficient Storage [RFC4918]

const StatusCode(507, 'Insufficient Storage')
LOOP_DETECTED → const StatusCode

508 Loop Detected [RFC5842]

const StatusCode(508, 'Loop Detected')
NOT_EXTENDED → const StatusCode

510 Not Extended [RFC2774]

const StatusCode(510, 'Not Extended')
NETWORK_AUTHENTICATION_REQUIRED → const StatusCode

511 Network Authentication Required [RFC6585]

const StatusCode(511, 'Network Authentication Required')

Properties

code int
The code of HTTP status code.
final
description String
The description of HTTP status code.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isClientError() bool
Check if status is within 400-499.
isInformational() bool
Check if status is within 100-199.
isRedirection() bool
Check if status is within 300-399.
isServerError() bool
Check if status is within 500-599.
isSuccess() bool
Check if status is within 200-299.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
throwException() → void
Throw exception if status code is not successful.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getByCode(int code) StatusCode?
Get HTTP status code from code
getDescriptionByCode(int code) String?
Get HTTP status description from code

Constants

values → const List<StatusCode>
A constant List of the values in this enum, in order of their declaration.