sendRequest method
Future
sendRequest({
- required String endPoint,
- required Map<
String, dynamic> param, - required Map<
String, dynamic> headers, - IDSMethodType method = IDSMethodType.post,
override
Sends an HTTP request to the specified endPoint
using the given param
, headers
, and method
.
This is an override that delegates the actual logic to a private _sendRequest
function.
By default, the request method is IDSMethodType.post.
endPoint
: API endpoint to which the request is sent.param
: Request body or query parameters.headers
: HTTP headers such as authentication tokens.method
: HTTP method to use (e.g., POST, GET, PUT). Defaults to IDSMethodType.post.
Returns a Future containing the response from the API.
Implementation
@override
Future sendRequest({
required String endPoint,
required Map<String, dynamic> param,
required Map<String, dynamic> headers,
IDSMethodType method = IDSMethodType.post,
}) {
return _sendRequest(
endPoint: endPoint,
param: param,
headers: headers,
method: method,
);
}