Class HttpWebRequest

    • Method Detail

      • setProxy

        public void setProxy​(WebProxy proxy)
        Sets the Web Proxy.
        Parameters:
        proxy - The Web Proxy
      • isHttpScheme

        public boolean isHttpScheme()
        Checks if is http scheme.
        Returns:
        true, if is http scheme
      • isHttpsScheme

        public boolean isHttpsScheme()
        Checks if is https scheme.
        Returns:
        true, if is https scheme
      • getUsername

        public String getUsername()
        Gets the user name.
        Returns:
        the user name
      • setUsername

        public void setUsername​(String username)
        Sets the user name.
        Parameters:
        username - the new user name
      • setPassword

        public void setPassword​(String password)
        Sets the password.
        Parameters:
        password - the new password
      • getDomain

        public String getDomain()
        Gets the domain.
        Returns:
        the domain
      • setDomain

        public void setDomain​(String domain)
        Sets the domain.
        Parameters:
        domain - the new domain
      • getUrl

        public URL getUrl()
        Gets the url.
        Returns:
        the url
      • setUrl

        public void setUrl​(URL url)
        Sets the url.
        Parameters:
        url - the new url
      • isPreAuthenticate

        public boolean isPreAuthenticate()
        Whether to use preemptive authentication. Currently not implemented, though.
      • setPreAuthenticate

        public void setPreAuthenticate​(boolean preAuthenticate)
        Whether to use preemptive authentication. Currently not implemented, though.
      • getTimeout

        public int getTimeout()
        Gets the timeout.
        Returns:
        the timeout
      • setTimeout

        public void setTimeout​(int timeout)
        Sets the timeout.
        Parameters:
        timeout - the new timeout
      • setContentType

        public void setContentType​(String contentType)
        Sets the content type.
        Parameters:
        contentType - the new content type
      • getAccept

        public String getAccept()
        Gets the accept.
        Returns:
        the accept
      • setAccept

        public void setAccept​(String accept)
        Sets the accept.
        Parameters:
        accept - the new accept
      • getUserAgent

        public String getUserAgent()
        Gets the user agent.
        Returns:
        the user agent
      • setUserAgent

        public void setUserAgent​(String userAgent)
        Sets the user agent.
        Parameters:
        userAgent - the new user agent
      • isAllowAutoRedirect

        public boolean isAllowAutoRedirect()
        Checks if is allow auto redirect.
        Returns:
        true, if is allow auto redirect
      • setAllowAutoRedirect

        public void setAllowAutoRedirect​(boolean allowAutoRedirect)
        Sets the allow auto redirect.
        Parameters:
        allowAutoRedirect - the new allow auto redirect
      • isKeepAlive

        public boolean isKeepAlive()
        Checks if is keep alive.
        Returns:
        true, if is keep alive
      • setKeepAlive

        public void setKeepAlive​(boolean keepAlive)
        Sets the keep alive.
        Parameters:
        keepAlive - the new keep alive
      • isAcceptGzipEncoding

        public boolean isAcceptGzipEncoding()
        Checks if is accept gzip encoding.
        Returns:
        true, if is accept gzip encoding
      • setAcceptGzipEncoding

        public void setAcceptGzipEncoding​(boolean acceptGzipEncoding)
        Sets the accept gzip encoding.
        Parameters:
        acceptGzipEncoding - the new accept gzip encoding
      • isUseDefaultCredentials

        public boolean isUseDefaultCredentials()
        Checks if is use default credential.
        Returns:
        true, if is use default credential
      • setUseDefaultCredentials

        public void setUseDefaultCredentials​(boolean useDefaultCredentials)
        Sets the use default credential.
        Parameters:
        useDefaultCredentials - the new use default credential
      • isAllowAuthentication

        public boolean isAllowAuthentication()
        Whether web service authentication is allowed. This can be set to false to disallow sending credential with this request. This is useful for the autodiscover request to the legacy HTTP url, because this single request doesn't require authentication and we don't want to send credential over HTTP.
        Returns:
        true if authentication is allowed.
      • setAllowAuthentication

        public void setAllowAuthentication​(boolean allowAuthentication)
        Whether web service authentication is allowed. This can be set to false to disallow sending credential with this request. This is useful for the autodiscover request to the legacy HTTP url, because this single request doesn't require authentication and we don't want to send credential over HTTP. Default is true.
        Parameters:
        allowAuthentication - true if authentication is allowed.
      • getRequestMethod

        public String getRequestMethod()
        Gets the request method type.
        Returns:
        the request method type.
      • setRequestMethod

        public void setRequestMethod​(String requestMethod)
        Sets the request method type.
        Parameters:
        requestMethod - the request method type.
      • setCredentials

        public void setCredentials​(String domain,
                                   String user,
                                   String pwd)
        Sets the credential.
        Parameters:
        domain - user domain
        user - user name
        pwd - password