request method

Future request(
  1. String serviceName,
  2. RequestMethod method,
  3. String path,
  4. ContentTypeEnum requestContentType,
  5. ContentTypeEnum responseContentType,
  6. bool? login,
  7. dynamic data,
)

Implementation

Future<dynamic> request(String serviceName,RequestMethod method, String path, ContentTypeEnum requestContentType, ContentTypeEnum responseContentType, bool? login, dynamic data) async {

  if (requestHandler == null) throw Exception('RequestHandler not set');
  if (responseHandler == null) throw Exception('ResponseHandler not set');

  final request = await requestHandler!.handle(serviceName, method, path, requestContentType, responseContentType, login, data);
  return responseHandler!.handle(request);
}