MockBaseRequest class abstract
- Inheritance
-
- Object
- BaseRequest
- MockBaseRequest
- Implementers
- Annotations
-
- @Deprecated(v3Deprecation)
Constructors
Properties
- autoRetry ↔ RequestAutoRetry
-
Configuration of automatic request retrying for failed requests. Use this
object to enable or disable automatic retrying, configure the criteria
that determines whether or not a request should be retried, as well as the
number of retries to attempt.
getter/setter pairinherited
- contentLength ↔ int?
-
Gets and sets the content-length of the request, in bytes. If the size of
the request is not known in advance, set this to null.
getter/setter pairinherited
- contentType ↔ MediaType?
-
Content-type of this request.
getter/setter pairinherited
-
done
→ Future<
Null> -
Future that resolves when the request has completed (successful or
otherwise).
no setterinherited
-
downloadProgress
→ Stream<
RequestProgress> -
RequestProgress stream for this HTTP request's download.
no setterinherited
- encoding ↔ Encoding?
-
Encoding to use when encoding or decoding the request body. Setting this
will also update the contentType's charset.
getter/setter pairinherited
- fragment ↔ String
-
The URI fragment or hash.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, String> -
Headers to send with the HTTP request. Headers are case-insensitive.
getter/setter pairinherited
- host ↔ String
-
The URI host, including sub-domains and the tld.
getter/setter pairinherited
- isDone → bool
-
Returns
true
if this request is complete (successful or failed),false
otherwise.no setterinherited - method → String?
-
HTTP method ('GET', 'POST', etc). Set automatically when the request is
sent via one of the request dispatch methods.
no setterinherited
-
onCanceled
→ Future<
Null> -
no setter
-
onSent
→ Future<
FinalizedRequest> -
no setter
- path ↔ String
-
The URI path.
getter/setter pairinherited
-
pathSegments
↔ Iterable<
String> -
The URI path segments.
getter/setter pairinherited
- port ↔ int
-
The URI port number.
getter/setter pairinherited
- query ↔ String
-
The URI query string.
getter/setter pairinherited
-
queryParameters
↔ Map<
String, String> -
The URI query parameters.
getter/setter pairinherited
-
queryParametersAll
↔ Map<
String, List< String> > -
The URI query parameters with support for multi-value params.
getter/setter pairinherited
- requestInterceptor ↔ RequestInterceptor?
-
Hook into the request lifecycle right before the request is sent.
getter/setter pairinherited
- responseInterceptor ↔ ResponseInterceptor?
-
Hook into the request lifecycle after the response has been received and
before the request is considered "complete" (in other words, before the
response is delivered to the caller).
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheme ↔ String
-
The URI scheme or protocol. Examples:
http
,https
,ws
.getter/setter pairinherited - timeoutThreshold ↔ Duration?
-
Amount of time to wait for the request to finish before canceling it and
considering it "timed out" (results in a RequestException being thrown).
getter/setter pairinherited
-
uploadProgress
→ Stream<
RequestProgress> -
RequestProgress stream for this HTTP request's upload.
no setterinherited
- uri ↔ Uri
-
The full URI.
getter/setter pairinherited
- withCredentials ↔ bool
-
Whether or not to send the request with credentials. Only applicable to
requests in the browser, but does not adversely affect any other platform.
getter/setter pairinherited
Methods
-
abort(
[Object? error]) → void -
Cancel this request. If the request has already finished, this will do
nothing.
inherited
-
addPathSegment(
String pathSegment) → void -
Add a single path segment to the end of the current path.
inherited
-
appendToPath(
String pathToAppend) → void -
Append to the current path.
inherited
-
causeFailureOnOpen(
) → void -
clone(
) → BaseRequest -
Returns an clone of this request.
inherited
-
complete(
{BaseResponse? response}) → void -
completeError(
{Object? error, BaseResponse? response}) → void -
configure(
dynamic configure(Object request)) → void -
Allows more advanced configuration of this request prior to sending. The
supplied callback
configure
will be called after opening, but prior to sending, this request. Therequest
parameter will either be an instance of HttpRequest or HttpClientRequest, depending on the platform. Ifconfigure
returns aFuture
, the request will not be sent until the returnedFuture
completes.inherited -
delete(
{Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a DELETE request.
inherited
-
get(
{Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a GET request.
inherited
-
head(
{Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a HEAD request.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
options(
{Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send an OPTIONS request.
inherited
-
patch(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a PATCH request.
inherited
-
post(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a POST request.
inherited
-
put(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send a PUT request.
inherited
-
removeQueryParam(
String param) → void -
Remove
param
from the URI query parameters.inherited -
retry(
) → Future< Response> -
Retry this request. Throws a
StateError
if this request did not or has yet to fail.inherited -
send(
String? method, {dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<Response> -
Send an HTTP request with a custom
method
.inherited -
setQueryParam(
String param, dynamic value) → void -
Set a single query parameter.
inherited
-
streamDelete(
{Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a DELETE request. The response will be streamed, meaning the body
will be available asynchronously. This is useful for large response bodies
or for proxies.
inherited
-
streamGet(
{Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a GET request. The response will be streamed, meaning the body will
be available asynchronously. This is useful for large response bodies or
for proxies.
inherited
-
streamHead(
{Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a HEAD request. The response will be streamed, meaning the body will
be available asynchronously. This is useful for large response bodies or
for proxies.
inherited
-
streamOptions(
{Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send an OPTIONS request. The response will be streamed, meaning the body
will be available asynchronously. This is useful for large response bodies
or for proxies.
inherited
-
streamPatch(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a PATCH request. The response will be streamed, meaning the body will
be available asynchronously. This is useful for large response bodies or
for proxies.
inherited
-
streamPost(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a POST request. The response will be streamed, meaning the body will
be available asynchronously. This is useful for large response bodies or
for proxies.
inherited
-
streamPut(
{dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send a PUT request. The response will be streamed, meaning the body will
be available asynchronously. This is useful for large response bodies or
for proxies.
inherited
-
streamRetry(
) → Future< StreamedResponse> -
Retry this request and stream the response. Throws a
StateError
if this request did not or has yet to fail.inherited -
streamSend(
String? method, {dynamic body, Map< String, String> ? headers, Uri? uri}) → Future<StreamedResponse> -
Send an HTTP request with a custom
method
. The response will be streamed, meaning the body will be available asynchronously. This is useful for large response bodies or for proxies.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
updateQuery(
Map< String, dynamic> queryParametersToUpdate, {bool mergeValues = false}) → void -
Update the URI query parameters, merging the given map with the
current query parameters map instead of overwriting it.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited