get<T> abstract method

Future<ApiResult<T>> get<T>(
  1. String path, {
  2. Map<String, dynamic>? query,
  3. Map<String, String>? headers,
})

Sends an HTTP GET request to path.

  • query: optional query parameters appended to the URL.
  • headers: optional request headers merged with defaults/interceptors.
  • Returns: ApiResult containing the decoded response body on success or an error description and status code on failure.

Implementation

Future<ApiResult<T>> get<T>(
  String path, {
  Map<String, dynamic>? query,
  Map<String, String>? headers,
});