ResponseCode enum
Enumerates the currently specified values for response codes (indicating success, a client error, or a server error).
Constructors
- ResponseCode(int codeClass, int codeDetail, String description)
-
const
Values
- created → const ResponseCode
-
2.01 Created
Defined in RFC 7252.
const ResponseCode(2, 01, 'Created')
- deleted → const ResponseCode
-
2.02 Deleted
Defined in RFC 7252.
const ResponseCode(2, 02, 'Deleted')
- valid → const ResponseCode
-
2.03 Valid
Defined in RFC 7252.
const ResponseCode(2, 03, 'Valid')
- changed → const ResponseCode
-
2.04 Changed
Defined in RFC 7252.
const ResponseCode(2, 04, 'Changed')
- content → const ResponseCode
-
2.05 Content
Defined in RFC 7252.
const ResponseCode(2, 05, 'Content')
- continues → const ResponseCode
-
2.31 Continue
Defined in RFC 7959.
const ResponseCode(2, 31, 'Continue')
- badRequest → const ResponseCode
-
4.00 Bad Request
Defined in RFC 7252.
const ResponseCode(4, 00, 'Bad Request')
-
4.01 Unauthorized
Defined in RFC 7252.
const ResponseCode(4, 01, 'Unauthorized')
- badOption → const ResponseCode
-
4.02 Bad Option
Defined in RFC 7252.
const ResponseCode(4, 02, 'Bad Option')
- forbidden → const ResponseCode
-
4.03 Forbidden
Defined in RFC 7252.
const ResponseCode(4, 03, 'Forbidden')
- notFound → const ResponseCode
-
4.04 Not Found
Defined in RFC 7252.
const ResponseCode(4, 04, 'Not Found')
- methodNotAllowed → const ResponseCode
-
4.05 Method Not Allowed
Defined in RFC 7252.
const ResponseCode(4, 05, 'Method Not Allowed')
- notAcceptable → const ResponseCode
-
4.06 Not Acceptable
Defined in RFC 7252.
const ResponseCode(4, 06, 'Not Acceptable')
- requestEntityIncomplete → const ResponseCode
-
4.08 Request Entity Incomplete
Defined in RFC 7959.
const ResponseCode(4, 08, 'Request Entity Incomplete')
- conflict → const ResponseCode
-
4.09 Conflict
Defined in RFC 8132.
const ResponseCode(4, 09, 'Conflict')
- preconditionFailed → const ResponseCode
-
4.12 Precondition Failed
Defined in RFC 7252.
const ResponseCode(4, 12, 'Precondition Failed')
- requestEntityTooLarge → const ResponseCode
-
4.13 Request Entity Too Large
Defined in RFC 7252 and RFC 7959.
const ResponseCode(4, 13, 'Request Entity Too Large')
- unsupportedMediaType → const ResponseCode
-
4.15 Unsupported Content-Format
Defined in RFC 7252.
const ResponseCode(4, 15, 'Unsupported Content-Format')
- unprocessableEntity → const ResponseCode
-
4.22 Unprocessable Entity
Defined in RFC 8132.
const ResponseCode(4, 22, 'Unprocessable Entity')
- tooManyRequests → const ResponseCode
-
4.29 Too Many Requests
Defined in RFC 8516.
const ResponseCode(4, 29, 'Too Many Requests')
- internalServerError → const ResponseCode
-
5.00 Internal Server Error
Defined in RFC 7252.
const ResponseCode(5, 00, 'Internal Server Error')
- notImplemented → const ResponseCode
-
5.01 Not Implemented
Defined in RFC 7252.
const ResponseCode(5, 01, 'Not Implemented')
- badGateway → const ResponseCode
-
5.02 Bad Gateway
Defined in RFC 7252.
const ResponseCode(5, 02, 'Bad Gateway')
-
5.03 Service Unavailable
Defined in RFC 7252.
const ResponseCode(5, 03, 'Service Unavailable')
- gatewayTimeout → const ResponseCode
-
5.04 Gateway Timeout
Defined in RFC 7252.
const ResponseCode(5, 04, 'Gateway Timeout')
- proxyingNotSupported → const ResponseCode
-
5.05 Proxying Not Supported
Defined in RFC 7252.
const ResponseCode(5, 05, 'Proxying Not Supported')
- hopLimitReached → const ResponseCode
-
5.08 Hop Limit Reached
Defined in RFC 8768.
const ResponseCode(5, 08, 'Hop Limit Reached')
Properties
- coapCode → CoapCode
-
Returns the CoapCode representing this ResponseCode.
no setter
- codeClass → int
-
The code class of this ResponseCode (either 2, 4, or 5).
final
- codeDetail → int
-
The code detail of this ResponseCode.
final
- description → String
-
A human-readable description of this ResponseCode.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
int code) → ResponseCode? -
Returns the ResponseCode corresponding with a numeric
code
(if defined). -
fromCoapCode(
CoapCode code) → ResponseCode? - Returns the ResponseCode corresponding with a given CoapCode (if defined).
Constants
-
values
→ const List<
ResponseCode> - A constant List of the values in this enum, in order of their declaration.