RestApiMock<C extends Object> class
- Inheritance
-
- Object
- ExternalDependency
- RestApi<
RestResponse> - RestApiMock
Constructors
- RestApiMock.new({required C content, RestResponseType responseType = RestResponseType.success})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getResponseTypeFromCode(
int? code) → RestResponseType -
Resolve to RestResponseType form status
code
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
request(
{required RestMethod method, required String path, Map< String, dynamic> requestBody = const {}}) → Future<RestResponse< C> > -
The Uri for the request is built inside ResApi, to give flexibility on
how it is used. The path parameter corresponds to the Uri path, which
doesn't hold the host, port and scheme.
override
-
requestBinary(
{required RestMethod method, required String path, Map< String, dynamic> requestBody = const {}}) → Future<RestResponse< C> > -
Request for binary data.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited