Interface HttpMetaData

    • Method Detail

      • headers

        HttpHeaders headers()
        Returns the headers of this message.
        Returns:
        the headers.
      • addHeader

        default HttpMetaData addHeader​(java.lang.CharSequence name,
                                       java.lang.CharSequence value)
        Adds a new header with the specified name and value.
        Parameters:
        name - the name of the header.
        value - the value of the header.
        Returns:
        this.
      • addHeaders

        default HttpMetaData addHeaders​(HttpHeaders headers)
        Adds all header names and values of headers object.
        Parameters:
        headers - the headers to add.
        Returns:
        this.
      • setHeader

        default HttpMetaData setHeader​(java.lang.CharSequence name,
                                       java.lang.CharSequence value)
        Sets a header with the specified name and value. Any existing headers with the same name are overwritten.
        Parameters:
        name - the name of the header.
        value - the value of the header.
        Returns:
        this.
      • setHeaders

        default HttpMetaData setHeaders​(HttpHeaders headers)
        Clears the current header entries and copies all header entries of the specified headers object.
        Parameters:
        headers - the headers object which contains new values.
        Returns:
        this.
      • addCookie

        default HttpMetaData addCookie​(java.lang.CharSequence name,
                                       java.lang.CharSequence value)
        Adds a cookie with the specified name and value.

        This may result in multiple HttpSetCookies with same name. Added cookie will not be wrapped, not secure, and not HTTP-only, with no path, domain, expire date and maximum age.

        Parameters:
        name - the name of the cookie.
        value - the value of the cookie.
        Returns:
        this.
      • addSetCookie

        default HttpMetaData addSetCookie​(java.lang.CharSequence name,
                                          java.lang.CharSequence value)
        Adds a set-cookie with the specified name and value.

        This may result in multiple HttpSetCookies with same name. Added cookie will not be wrapped, not secure, and not HTTP-only, with no path, domain, expire date and maximum age.

        Parameters:
        name - the name of the cookie.
        value - the value of the cookie.
        Returns:
        this.
      • toString

        java.lang.String toString()
        Returns a string representation of the message. To avoid accidentally logging sensitive information, implementations should not return any header or content.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of the message
      • toString

        default java.lang.String toString​(java.util.function.BiFunction<? super java.lang.CharSequence,​? super java.lang.CharSequence,​java.lang.CharSequence> headerFilter)
        Returns a string representation of the message and headers.
        Parameters:
        headerFilter - a function that accepts the header name and value and returns the filtered value
        Returns:
        string representation of the message and headers