request<T> abstract method

Future<T> request<T>({
  1. required String endpoint,
  2. required HttpMethod method,
  3. Object? body,
  4. Map<String, String>? headers,
  5. required T fromJson(
    1. Map<String, dynamic>
    ),
})

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,
});