PeekRequest class final
The request half of a network call: what was sent.
- Annotations
Constructors
-
PeekRequest({required String method, required Uri uri, PeekHeaders headers = PeekHeaders.empty, PeekBody body = const PeekBody.empty(), Map<
String, Object?> extra = const {}}) -
Creates a request.
methodis uppercased;extrais copied.
Properties
- body → PeekBody
-
The request body.
final
- contentLength → int?
-
Body size from the
Content-Lengthheader, else from the body itself.no setter -
extra
→ Map<
String, Object?> -
Free-form metadata from the adapter, such as a client label.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- headers → PeekHeaders
-
The request headers.
final
- host → String
-
The host part of uri.
no setter
- mediaType → PeekMediaType?
-
The body's media type, else the parsed
Content-Typeheader.no setter - method → String
-
The HTTP method, uppercase.
final
- path → String
-
The path part of uri.
no setter
-
queryParameters
→ Map<
String, List< String> > -
Query parameters of uri, every value of a repeated name kept.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri
-
The full URL, query included.
final
Methods
-
copyWith(
{String? method, Uri? uri, PeekHeaders? headers, PeekBody? body, Map< String, Object?> ? extra}) → PeekRequest - A copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Method, host and path only: no query, headers or body.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override