BaseHttpRequest class
An HTTP request that can be used on a client or statically.
Constructors
-
BaseHttpRequest.new({HttpMethod method = HttpMethod.get, required String url, Map<
String, String> ? query, HttpHeaders? headers, HttpBody? body, HttpExpectBody expectBody = HttpExpectBody.stream, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress})
Properties
-
additionalData
→ Map<
String, dynamic> -
Map that can be used to store additional information.
Primarily used by interceptors.
This is not const to allow for modifications.
final
- body → HttpBody?
-
The body of the request.
final
- cancelToken → CancelToken?
-
The cancel token to use for the request.
final
- expectBody → HttpExpectBody
-
The expected body type of the response.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → HttpHeaders?
-
Headers to send with the request.
final
- method → HttpMethod
-
The HTTP method to use.
final
- onReceiveProgress → ProgressCallback?
-
Receive progress callback.
final
- onSendProgress → ProgressCallback?
-
Send progress callback.
final
-
query
→ Map<
String, String> ? -
Query parameters.
This can be null, if there are no query parameters
or if they are already part of the URL.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
The URL to request.
final
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