getArrayRequest abstract method

Future getArrayRequest({
  1. required String endPoint,
  2. required Map<String, dynamic> headers,
})

Sends a GET request to the specified endPoint and expects the response as an array (list).

This method is typically used when the server returns a list/array in the response body. It returns a Future that resolves to the dynamic response data (usually a List).

  • endPoint: The URL path or endpoint to which the request is sent.
  • headers: Custom headers such as authorization tokens or content types.

Returns a Future containing the response data (array), or throws an error if the request fails.

Implementation

Future<dynamic> getArrayRequest({
  required String endPoint,
  required Map<String, dynamic> headers,
});