RequestExecutor class abstract
This abstract class is the main handler for http calls. Derive from this class and implement the execute method, which receives the RowRequest as an argument and returns RowResponse as a result. The actual http call should happen in the execute method's body. To create a HttpRestClient instance, first and foremost you will need to provide an implementation of RequestExecutor to HttpRestClient.builder as shown in the example below.
final HttpRestClient client =
HttpRestClient.builder(DefaultRequestExecutor(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(
RowRequest rowRequest) → Future< RowResponse> -
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