RequestMethods class
A utility class that provides constants and predefined lists for various HTTP request methods.
This class includes constants for common HTTP methods and provides convenience lists for frequently used method combinations. It is useful for standardizing and managing HTTP method strings throughout an application.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
ALL
→ List<
String> -
A list of all HTTP methods supported by this class.
no setter
-
GET_POST
→ List<
String> -
A list of commonly used HTTP methods for request submissions.
no setter
-
ONLY_DELETE
→ List<
String> -
A list containing only the HTTP DELETE method.
no setter
-
ONLY_GET
→ List<
String> -
A list containing only the HTTP GET method.
no setter
-
ONLY_INSERT
→ List<
String> -
A list containing only the HTTP INSERT method.
no setter
-
ONLY_POST
→ List<
String> -
A list containing only the HTTP POST method.
no setter
-
ONLY_PUT
→ List<
String> -
A list containing only the HTTP PUT method.
no setter
Constants
- CONNECT → const String
- The HTTP CONNECT method.
- DELETE → const String
- The HTTP DELETE method.
- GET → const String
- The HTTP GET method.
- HEAD → const String
- The HTTP HEAD method.
- INSERT → const String
- The HTTP INSERT method (non-standard, generally used for custom purposes).
- OPTIONS → const String
- The HTTP OPTIONS method.
- PATCH → const String
- The HTTP PATCH method.
- POST → const String
- The HTTP POST method.
- PUT → const String
- The HTTP PUT method.
- TRACE → const String
- The HTTP TRACE method.