MockChopperClientMixin mixin base
ChopperClient mixin for the purposes of creating mocks using a mocking framework such as Mockito or Mocktail.
base class MockChopperClient extends Mock with MockChopperClientMixin {}
- Implemented types
- @visibleForTesting
Properties
- authenticator → Authenticator?
-
The Authenticator that can provide reactive authentication for a
request.
finalinherited
- baseUrl → Uri
-
Base URL of each request of the registered services.
E.g., the hostname of your service.
finalinherited
- converter → Converter?
-
The Converter that handles request and response transformation before
the request and response interceptors are called respectively.
finalinherited
- errorConverter → ErrorConverter?
-
The ErrorConverter that handles response transformation before the
response interceptors are called, but only on error responses
(statusCode < 200 || statusCode >= 300).
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Client
-
The
http.Client
used to make network calls.finalinherited -
onRequest
→ Stream<
Request> -
A stream of processed
Request
s, as in after all Converters, and RequestInterceptors have been run.no setterinherited -
onResponse
→ Stream<
Response> -
A stream of processed
Response
s, as in after all Converters and ResponseInterceptors have been run.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete<
BodyType, InnerType> (Uri url, {Map< String, String> headers = const {}, Map<String, dynamic> parameters = const {}, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP DELETE request using the send function.
inherited
-
dispose(
) → void -
Disposes this ChopperClient to clean up memory.
inherited
-
get<
BodyType, InnerType> (Uri url, {Map< String, String> headers = const {}, Uri? baseUrl, Map<String, dynamic> parameters = const {}, dynamic body}) → Future<Response< BodyType> > -
Makes a HTTP GET request using the send function.
inherited
-
getService<
ServiceType extends ChopperService> () → ServiceType -
Retrieve any service included in the ChopperClient
inherited
-
head<
BodyType, InnerType> (Uri url, {Map< String, String> headers = const {}, Map<String, dynamic> parameters = const {}, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP HEAD request using the send function.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
options<
BodyType, InnerType> (Uri url, {Map< String, String> headers = const {}, Map<String, dynamic> parameters = const {}, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP OPTIONS request using the send function.
inherited
-
patch<
BodyType, InnerType> (Uri url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}, Map<String, dynamic> parameters = const {}, bool multipart = false, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP PATCH request using the send function.
inherited
-
post<
BodyType, InnerType> (Uri url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}, Map<String, dynamic> parameters = const {}, bool multipart = false, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP POST request using the send function
inherited
-
put<
BodyType, InnerType> (Uri url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}, Map<String, dynamic> parameters = const {}, bool multipart = false, Uri? baseUrl}) → Future<Response< BodyType> > -
Makes a HTTP PUT request using the send function.
inherited
-
send<
BodyType, InnerType> (Request request, {ConvertRequest? requestConverter, ConvertResponse? responseConverter}) → Future< Response< BodyType> > -
Sends a pre-build Request, applying all provided
Interceptor
s and Converters.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited