All Downloads are FREE. Search and download functionalities are using the official Maven repository.

doc.com.rallydev.rest.client.HttpClient.html Maven / Gradle / Ivy






HttpClient (Rally Rest API for Java 2.2)











com.rallydev.rest.client

Class HttpClient

    • Method Detail

      • setProxy

        public void setProxy(URI proxy)
        Set the unauthenticated proxy server to use. By default no proxy is configured.
        Parameters:
        proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")
      • setProxy

        public void setProxy(URI proxy,
                    String userName,
                    String password)
        Set the authenticated proxy server to use. By default no proxy is configured.
        Parameters:
        proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")
        userName - The username to be used for authentication.
        password - The password to be used for authentication.
      • setApplicationVendor

        public void setApplicationVendor(String value)
        Set the value of the X-RallyIntegrationVendor header included on all requests. This should be set to your company name.
        Parameters:
        value - The vendor header to be included on all requests.
      • setApplicationVersion

        public void setApplicationVersion(String value)
        Set the value of the X-RallyIntegrationVersion header included on all requests. This should be set to the version of your application.
        Parameters:
        value - The vendor header to be included on all requests.
      • setApplicationName

        public void setApplicationName(String value)
        Set the value of the X-RallyIntegrationName header included on all requests. This should be set to the name of your application.
        Parameters:
        value - The vendor header to be included on all requests.
      • getServer

        public String getServer()
        Get the current server being targeted.
        Returns:
        the current server.
      • getWsapiVersion

        public String getWsapiVersion()
        Get the current version of the WSAPI being targeted.
        Returns:
        the current WSAPI version.
      • setWsapiVersion

        public void setWsapiVersion(String wsapiVersion)
        Set the current version of the WSAPI being targeted.
        Parameters:
        wsapiVersion - the new version, e.g. "1.30"
      • doPost

        public String doPost(String url,
                    String body)
                      throws IOException
        Perform a post against the WSAPI
        Parameters:
        url - the request url
        body - the body of the post
        Returns:
        the JSON encoded string response
        Throws:
        IOException - if a non-200 response code is returned or if some other problem occurs while executing the request
      • doPut

        public String doPut(String url,
                   String body)
                     throws IOException
        Perform a put against the WSAPI
        Parameters:
        url - the request url
        body - the body of the put
        Returns:
        the JSON encoded string response
        Throws:
        IOException - if a non-200 response code is returned or if some other problem occurs while executing the request
      • doDelete

        public String doDelete(String url)
                        throws IOException
        Perform a delete against the WSAPI
        Parameters:
        url - the request url
        Returns:
        the JSON encoded string response
        Throws:
        IOException - if a non-200 response code is returned or if some other problem occurs while executing the request
      • doGet

        public String doGet(String url)
                     throws IOException
        Perform a get against the WSAPI
        Parameters:
        url - the request url
        Returns:
        the JSON encoded string response
        Throws:
        IOException - if a non-200 response code is returned or if some other problem occurs while executing the request
      • getWsapiUrl

        public String getWsapiUrl()
        Get the WSAPI base url based on the current server and WSAPI version
        Returns:
        the fully qualified WSAPI base url, e.g. https://rally1.rallydev.com/slm/webservice/1.33




© 2015 - 2025 Weber Informatics LLC | Privacy Policy