RequestMethod enum
Enumerates the currently specified values for request method codes.
Also includes the code for empty messages for now due to technical reasons.
Constructors
- RequestMethod(int codeClass, int codeDetail, String description)
-
const
Values
- empty → const RequestMethod
-
Indicates an empty message
Defined in RFC 7252.
const RequestMethod(0, 0, 'Empty')
- get → const RequestMethod
-
The GET method
Defined in RFC 7252.
const RequestMethod(0, 01, 'GET')
- post → const RequestMethod
-
The POST method
Defined in RFC 7252.
const RequestMethod(0, 02, 'POST')
- put → const RequestMethod
-
The PUT method
Defined in RFC 7252.
const RequestMethod(0, 03, 'PUT')
- delete → const RequestMethod
-
The DELETE method
Defined in RFC 7252.
const RequestMethod(0, 04, 'DELETE')
- fetch → const RequestMethod
-
The FETCH method
Defined in RFC 8132.
const RequestMethod(0, 05, 'FETCH')
- patch → const RequestMethod
-
The PATCH method
Defined in RFC 8132.
const RequestMethod(0, 06, 'PATCH')
- ipatch → const RequestMethod
-
The iPATCH method
Defined in RFC 8132.
const RequestMethod(0, 07, 'iPATCH')
Properties
- coapCode → CoapCode
-
Returns the CoapCode representing this RequestMethod.
no setter
- codeClass → int
-
The code class of this RequestMethod (always 0).
final
- codeDetail → int
-
The code detail of this RequestMethod (in the range of 0 to 7).
final
- description → String
-
A human-readable description of this RequestMethod.
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) → RequestMethod? -
Returns the RequestMethod corresponding with a numeric
code
(if defined). -
fromCoapCode(
CoapCode code) → RequestMethod? - Returns the RequestMethod corresponding with a given CoapCode (if defined).
Constants
-
values
→ const List<
RequestMethod> - A constant List of the values in this enum, in order of their declaration.