sendRequest abstract method
Sends an HTTP request to the specified endPoint
with given param
and headers
.
This method supports different request methods defined by IDSMethodType, with the default being post
.
It returns a Future that resolves to the dynamic response data from the server.
endPoint
: The URL path or endpoint to which the request is sent.param
: The body or query parameters to be included in the request.headers
: Custom headers such as authorization tokens or content types.method
: Type of HTTP method (GET, POST, etc.) defined in IDSMethodType. Default is POST.
Returns a Future containing the response data, or throws an error if the request fails.
Implementation
Future<dynamic> sendRequest({
required String endPoint,
required Map<String, dynamic> param,
required Map<String, dynamic> headers,
IDSMethodType method = IDSMethodType.post,
});