Interface OutboundRequestHeaders

All Superinterfaces:
InboundHeaders, InboundRequestHeaders, OutboundHeaders<OutboundRequestHeaders>

public interface OutboundRequestHeaders extends InboundRequestHeaders, OutboundHeaders<OutboundRequestHeaders>

Represents mutable outbound HTTP request headers.

This extends the OutboundHeaders to expose request specific information like content type, content length and cookies.

An outbound request is sent by a client in a client exchange.

Since:
1.6
Author:
Jeremy Kuhn
  • Method Details

    • contentType

      OutboundRequestHeaders contentType(String contentType)

      Sets the request content type header field value.

      Parameters:
      contentType - the content type
      Returns:
      the request headers
    • contentLength

      OutboundRequestHeaders contentLength(long contentLength)

      Sets the request content length.

      Parameters:
      contentLength - the content length
      Returns:
      the request headers
    • cookies

      OutboundRequestHeaders cookies(Consumer<OutboundCookies> cookiesConfigurer)

      Sets the request cookies.

      Parameters:
      cookiesConfigurer - an outbound cookies configurer
      Returns:
      the request headers