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