Interface RequestEntity.HeadersBuilder<B extends RequestEntity.HeadersBuilder<B>>

    • Method Detail

      • header

        B header​(String headerName,
                 String... headerValues)
        Add the given, single header value under the given name.
        Parameters:
        headerName - the header name
        headerValues - the header value(s)
        Returns:
        this builder
        See Also:
        HttpHeaders.add(String, String)
      • headers

        B headers​(Consumer<HttpHeaders> headersConsumer)
        Manipulate this entity's headers with the given consumer. The headers provided to the consumer are "live", so that the consumer can be used to overwrite existing header values, remove values, or use any of the other HttpHeaders methods.
        Parameters:
        headersConsumer - a function that consumes the HttpHeaders
        Returns:
        this builder
        Since:
        5.2
      • accept

        B accept​(MediaType... acceptableMediaTypes)
        Set the list of acceptable media types, as specified by the Accept header.
        Parameters:
        acceptableMediaTypes - the acceptable media types
      • acceptCharset

        B acceptCharset​(Charset... acceptableCharsets)
        Set the list of acceptable charsets, as specified by the Accept-Charset header.
        Parameters:
        acceptableCharsets - the acceptable charsets
      • ifModifiedSince

        B ifModifiedSince​(ZonedDateTime ifModifiedSince)
        Set the value of the If-Modified-Since header.
        Parameters:
        ifModifiedSince - the new value of the header
        Since:
        5.1.4
      • ifModifiedSince

        B ifModifiedSince​(Instant ifModifiedSince)
        Set the value of the If-Modified-Since header.
        Parameters:
        ifModifiedSince - the new value of the header
        Since:
        5.1.4
      • ifModifiedSince

        B ifModifiedSince​(long ifModifiedSince)
        Set the value of the If-Modified-Since header.

        The date should be specified as the number of milliseconds since January 1, 1970 GMT.

        Parameters:
        ifModifiedSince - the new value of the header
      • ifNoneMatch

        B ifNoneMatch​(String... ifNoneMatches)
        Set the values of the If-None-Match header.
        Parameters:
        ifNoneMatches - the new value of the header