execute method
Future<RestResponse>
execute(
- RestRequest request, {
- required Decoder decoder,
- CancelToken? cancelToken,
override
Ejecuta la petición y devuelve una respuesta "cruda" (todavía sin decodificar el body a un tipo concreto). El RestClient se encarga de aplicar el Decoder.
(new): accepts an optional
CancelToken. When the token is cancelled
mid-flight, the implementation must abort the
in-flight socket and the returned Future
fails with a RequestCancelledException
(carrying the reason from token.cancel(...)).
Implementations that cannot honour the token
must still complete the call (cancellation
is best-effort).
Implementation
@override
Future<RestResponse<dynamic>> execute(
RestRequest request, {
required Decoder<dynamic> decoder,
CancelToken? cancelToken,
}) async {
await _acquire();
return inner.execute(request, decoder: decoder, cancelToken: cancelToken);
}