Request class
HTTP request representation
- Annotations
-
- @immutable
Constructors
-
Request({required HttpMethod method, required Uri uri, Object? headers, Object? body, RequestOptions? options, RequestTrace? trace, Map<
String, Object?> extensions = const {}})
Properties
- body → Object?
-
final
-
extensions
→ Map<
String, Object?> -
Transport-specific options passed through without the interface knowing
about them. Forward-compatible: SNI, source IP, socket buffer sizes,
etc. can be added without breaking changes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → Headers
-
final
- isIdempotent → bool
-
Check if the request method is idempotent
no setter
- method → HttpMethod
-
final
- methodString → String
-
Convert HttpMethod to string
no setter
- options → RequestOptions?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trace → RequestTrace?
-
Optional trace populated by the transport with phase timestamps.
final
- uri → Uri
-
final
Methods
-
copyWith(
{HttpMethod? method, Uri? uri, Object? headers, Object? body, RequestOptions? options, RequestTrace? trace, Map< String, Object?> ? extensions}) → Request -
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