Class HTTPClient

    • Constructor Detail

      • HTTPClient

        public HTTPClient()
    • Method Detail

      • getContentType

        protected int getContentType​(Set<String> contentType)
      • checkInit

        protected void checkInit()
      • paramsToRequest

        protected String paramsToRequest​(Object[] objects)
                                  throws UnsupportedEncodingException
        Takes the array of objects for an evaluate method and creates the right url This is used in get and delete. Options are 0 args - return current host 1 arg - stem, parameters 2 args - uri path + stem of parameters
        Parameters:
        objects -
        Returns:
        a valid get/delete string of host+uri_path+?key0=value0&key1=value1...
        Throws:
        UnsupportedEncodingException
      • getResponseStem

        public QDLStem getResponseStem​(org.apache.http.HttpResponse response)
                                throws IOException
        Utillity to turn the response, whatever it is, into a stem.
        Parameters:
        response -
        Returns:
        Throws:
        IOException
      • jsonToStemJSON

        protected QDLStem jsonToStemJSON​(String rawJSON)
      • getURIPathBlurb

        protected List<String> getURIPathBlurb()
      • doPostOrPut

        public Object doPostOrPut​(Object[] objects,
                                  State state,
                                  boolean isPost)
      • getActualHost

        protected String getActualHost​(String uriPath)
        Given a uriPath, return the actual path to the service. This does the nitpicky things to create the path.
        Parameters:
        uriPath -
        Returns:
      • serializeToJSON

        public net.sf.json.JSONObject serializeToJSON()
        Description copied from interface: QDLMetaModule
        Send back a serialization of internal state for this object. This allows for the state you choose to be serialized and then reloaded.

        NOTE

        There is no canonical form for this. Set it how you will and deserialize it accordingly.
        Specified by:
        serializeToJSON in interface QDLMetaModule
        Returns: