code: public <T> T invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
  
      ClientResponse response = getAPIResponse(path, method, queryParams, body, headerParams, formParams, accept, contentType, authNames);
  
      statusCode = response.getStatusInfo().getStatusCode();
      responseHeaders = response.getHeaders();
  
      if (response.getStatusInfo().getStatusCode() == ClientResponse.Status.NO_CONTENT.getStatusCode()) {
        return null;
      } else if (response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
        if (returnType == null)
          return null;
        else
          return response.getEntity(returnType);
      } else {
        String message = "error";
        String respBody = null;
        if (response.hasEntity()) {
          try {
            respBody = response.getEntity(String.class);
            message = respBody;
          } catch (RuntimeException e) {
            // e.printStackTrace();
          }
        }
        throw new ApiException(
                response.getStatusInfo().getStatusCode(),
                message,
                response.getHeaders(),
                respBody);
      }
    }
docs: Invoke API by sending HTTP request with the given options.
  
  @param <T> Type
  @param path The sub-path of the HTTP URL
  @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
  @param queryParams The query parameters
  @param body The request body object - if it is not binary, otherwise null
  @param headerParams The header parameters
  @param formParams The form parameters
  @param accept The request's Accept header
  @param contentType The request's Content-Type header
  @param authNames The authentications to apply
  @param returnType Return type
  @return The response body in type of string
  @throws ApiException API exception