Class HttpRequest

    • Constructor Detail

      • HttpRequest

        public HttpRequest​(java.lang.String method,
                           java.lang.String url)
                    throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException
      • HttpRequest

        public HttpRequest​(java.lang.String method,
                           java.net.URL url)
    • Method Detail

      • getMethod

        public java.lang.String getMethod()
        Returns:
        The request method
      • getURL

        public java.net.URL getURL()
        Returns:
        The request url
      • setFollowRedirects

        public HttpRequest setFollowRedirects​(boolean followRedirects)
        Set if redirects should be followed.
        Parameters:
        followRedirects - If redirects should be followed
        Returns:
        This instance for chaining
      • setFollowRedirects

        public HttpRequest setFollowRedirects​(@Nonnull
                                              HttpRequest.FollowRedirects followRedirects)
        Set if redirects should be followed.
        Parameters:
        followRedirects - If redirects should be followed
        Returns:
        This instance for chaining
      • isCookieManagerSet

        public boolean isCookieManagerSet()
        Returns:
        If the cookie manager is set
      • unsetCookieManager

        public HttpRequest unsetCookieManager()
        Unset the cookie manager.
        Returns:
        This instance for chaining
      • getCookieManager

        @Nullable
        public java.net.CookieManager getCookieManager()
        Returns:
        The set cookie manager
      • setCookieManager

        public HttpRequest setCookieManager​(@Nullable
                                            java.net.CookieManager cookieManager)
        Set the cookie manager to use for this request.
        Parameters:
        cookieManager - The cookie manager to use
        Returns:
        This instance for chaining
      • isRetryHandlerSet

        public boolean isRetryHandlerSet()
        Returns:
        If the retry handler is set
      • unsetRetryHandler

        public HttpRequest unsetRetryHandler()
        Unset the retry handler.
        Returns:
        This instance for chaining
      • getRetryHandler

        @Nonnull
        public RetryHandler getRetryHandler()
        Returns:
        The set retry handler
      • setRetryHandler

        public HttpRequest setRetryHandler​(@Nonnull
                                           RetryHandler retryHandler)
        Set the retry handler to use for this request.
        Parameters:
        retryHandler - The retry handler to use
        Returns:
        This instance for chaining