request<T, E> method
Sends a request to the blockfrost network using the specified request
parameter.
The timeout
parameter, if provided, sets the maximum duration for the request.
Implementation
Future<T> request<T, E>(BlockforestRequestParam<T, E> request,
[Duration? timeout]) async {
final data = await requestDynamic(request, timeout);
final Object result;
if (E == List<Map<String, dynamic>>) {
result = (data as List).map((e) => Map<String, dynamic>.from(e)).toList();
} else {
result = data;
}
return request.onResonse(result as E);
}