Interface HttpClientRequest

All Superinterfaces:
HttpClientInfos, HttpInfos

public interface HttpClientRequest extends HttpClientInfos
An Http Reactive client metadata contract for outgoing requests. It inherits several accessor related to HTTP flow : headers, params, URI, method, websocket...
Author:
Stephane Maldini, Simon Baslé
  • Method Details

    • addCookie

      HttpClientRequest addCookie(Cookie cookie)
      Add an outbound cookie.
      Returns:
      this outbound
    • addHeader

      HttpClientRequest addHeader(CharSequence name, CharSequence value)
      Add an outbound http header, appending the value if the header is already set.
      Parameters:
      name - header name
      value - header value
      Returns:
      this outbound
    • header

      Set an outbound header, replacing any pre-existing value.
      Parameters:
      name - headers key
      value - header value
      Returns:
      this outbound
    • headers

      HttpClientRequest headers(HttpHeaders headers)
      Set outbound headers from the passed headers. It will however ignore HOST header key. Any pre-existing value for the passed headers will be replaced.
      Parameters:
      headers - a netty headers map
      Returns:
      this outbound
    • isFollowRedirect

      boolean isFollowRedirect()
      Return true if redirected will be followed.
      Returns:
      true if redirected will be followed
    • responseTimeout

      HttpClientRequest responseTimeout(Duration maxReadOperationInterval)
      Specifies the maximum duration allowed between each network-level read operation while reading a given response (resolution: ms). In other words, ReadTimeoutHandler is added to the channel pipeline after sending the request and is removed when the response is fully received. If the maxReadOperationInterval is null, any previous setting will be removed and no maxReadOperationInterval will be applied. If the maxReadOperationInterval is less than 1ms, then 1ms will be the maxReadOperationInterval. The maxReadOperationInterval setting on HttpClientRequest level overrides any maxReadOperationInterval setting on HttpClient level.
      Parameters:
      maxReadOperationInterval - the maximum duration allowed between each network-level read operations (resolution: ms).
      Returns:
      this outbound
      Since:
      0.9.11
      See Also: