request<T> method

Future<T> request<T>(
  1. XRPLedgerRequest<T> request
)

Sends an XRPLedgerRequest and returns the parsed response.

The request parameter represents an XRPLedgerRequest instance to be sent. Generates a unique identifier for the request and sends it using _makeCustomCall. Returns the parsed response after invoking the onResponse method of the XRPLedgerRequest.

Implementation

Future<T> request<T>(XRPLedgerRequest<T> request) async {
  _requestId += 1;
  final resp = await _makeCustomCall<Map<String, dynamic>>(
      request.toRequest(_requestId));

  return request.onResonse(resp);
}