request<T> abstract method
Performs an asynchronous network request and decodes the JSON response.
Implementation
Future<T> request<T>({
required String endpoint,
required HttpMethod method,
Object? body,
Map<String, String>? headers,
required T Function(Map<String, dynamic>) fromJson,
});