Interface HttpOutgoingRequest<Self>

    • Method Detail

      • method

        java.util.Optional<HttpMethod> method()
        Returns:
        Currently set HTTP method, if any.
      • method

        Self method​(HttpMethod method)
        Sets HTTP method. Must be specified.
        Parameters:
        method - Desired method.
        Returns:
        This request.
      • queryParameter

        default java.util.Optional<java.lang.String> queryParameter​(java.lang.String name)
        Gets first query parameter with given name, if any such.
        Parameters:
        name - Name of query parameter. Case sensitive.
        Returns:
        Query parameter value, if a corresponding parameter name exists.
      • queryParameter

        Self queryParameter​(java.lang.String name,
                            java.lang.Object value)
        Sets query parameter pair, replacing all previous such with the same name.
        Parameters:
        name - Name of query parameter. Case sensitive.
        value - Desired parameter value.
        Returns:
        This request.
      • queryParameters

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> queryParameters()
        Returns:
        Modifiable map of query parameters.
      • path

        java.util.Optional<java.lang.String> path()
        Returns:
        Currently set request path, if any.
      • path

        Self path​(java.lang.String path)
        Sets absolute request path. Must be specified.

        An absolute path must start with a forward slash and must not contain any query parameters of fragment.

        Parameters:
        path - Desired absolute request path.
        Returns:
        This request.
        Throws:
        java.lang.IllegalArgumentException - If path is both not null and not an absolute path.
      • uri

        default java.util.Optional<java.net.URI> uri()
        Gets any current request URL data and assembles it into a URI.

        The method returns Optional.empty() only if no path it set.

        Returns:
        Current request URI, if any.
      • uri

        default Self uri​(java.lang.String uri)
        Sets path and query parameters directly from given URI string.

        Any other parts of the URI, such as scheme, authority or fragment, are ignored.

        Parameters:
        uri - URI to set.
        Returns:
        This request.
      • uri

        default Self uri​(java.net.URI uri)
        Sets path and query parameters directly from given URI.

        Any other parts of the URI, such as scheme, authority or fragment, are ignored.

        Parameters:
        uri - URI to set.
        Returns:
        This request.