RestRequestExecutor class abstract
This abstract class is the main handler for http calls. Derive from this class and implement the execute method, which receives the RestRowRequest as an argument and returns RestRowResponse as a result. The actual http call should happen in the execute method's body. To create a RestClient instance, first and foremost you will need to provide an implementation of RestRequestExecutor to RestClient.builder as shown in the example below.
final RestClient client =
RestClient.builder(DefaultRestRequestExecutor(Client()))
.addRequestConverter(MapToJsonRequestConverter())
.addResponseConverter(JsonToMapResponseConverter())
.addResponseMiddleware(ResponseLogger())
.addRequestMiddleware(RequestLogger())
.build();
- Implementers
Constructors
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
-
execute(
RestRowRequest rowRequest) → Future< RestRowResponse> -
Override this method and implement http call by using the parameters from
the
rowRequest
. -
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