code: public String getActionResultText(String action, String params,
        TokenResult token, Object pFormData, String format) throws Exception {
      String queryUrl = siteurl + scriptPath + apiPath + "action=" + action
          + "&format=" + format;
      ClientResponse response;
      // decide for the method to use for api access
      response = this.getPostResponse(queryUrl, params, token, pFormData);
      String text = this.getResponseString(response);
      return text;
    }
docs: get the action result for the given parameters
  
  @param action
  @param params
  @param token
  @param pFormData
  @param format
  - json or xml
  @return the String e.g. xml or json
  @throws Exception