Top Description Methods
reactor.netty.http.client

public Interface HttpClientRequest

extends HttpClientInfos
Known Direct Implementers
reactor.netty.http.client.FailedHttpClientRequest, reactor.netty.http.client.HttpClientOperations
Imports
io.netty.handler.codec.http.HttpHeaders, io.netty.handler.codec.http.cookie.Cookie, java.time.Duration

An Http Reactive client metadata contract for outgoing requests. It inherits several accessor related to HTTP flow : headers, params, URI, method, websocket...
Authors
Stephane Maldini, Simon Baslé

Method Summary

Modifier and TypeMethod and Description
public HttpClientRequest

Returns:

this outbound
addCookie
(Cookie cookie)

Add an outbound cookie.

public HttpClientRequest

Returns:

this outbound
addHeader
(CharSequence
header name
name
,
CharSequence
header value
value
)

Add an outbound http header, appending the value if the header is already set.

public HttpClientRequest

Returns:

this outbound
header
(CharSequence
headers key
name
,
CharSequence
header value
value
)

Set an outbound header, replacing any pre-existing value.

public HttpClientRequest

Returns:

this outbound
headers
(HttpHeaders
a netty headers map
headers
)

Set outbound headers from the passed headers.

public boolean

Returns:

true if redirected will be followed
isFollowRedirect
()

Return true if redirected will be followed.

public HttpClientRequest

Returns:

this outbound
responseTimeout
(Duration
the maximum duration allowed between each network-level read operations (resolution: ms).
maxReadOperationInterval
)

Specifies the maximum duration allowed between each network-level read operation while reading a given response (resolution: ms).

Inherited from reactor.netty.http.client.HttpClientInfos:
currentContextcurrentContextViewredirectedFromrequestHeadersresourceUrl

Method Detail

addCookieback to summary
public HttpClientRequest addCookie(Cookie cookie)

Add an outbound cookie.

Returns:HttpClientRequest

this outbound

addHeaderback to summary
public HttpClientRequest addHeader(CharSequence name, CharSequence value)

Add an outbound http header, appending the value if the header is already set.

Parameters
name:CharSequence

header name

value:CharSequence

header value

Returns:HttpClientRequest

this outbound

headerback to summary
public HttpClientRequest header(CharSequence name, CharSequence value)

Set an outbound header, replacing any pre-existing value.

Parameters
name:CharSequence

headers key

value:CharSequence

header value

Returns:HttpClientRequest

this outbound

headersback to summary
public 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:HttpHeaders

a netty headers map

Returns:HttpClientRequest

this outbound

isFollowRedirectback to summary
public boolean isFollowRedirect()

Return true if redirected will be followed.

Returns:boolean

true if redirected will be followed

responseTimeoutback to summary
public 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, io.netty.handler.timeout.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:Duration

the maximum duration allowed between each network-level read operations (resolution: ms).

Returns:HttpClientRequest

this outbound

Since
0.9.11
See Also
io.netty.handler.timeout.ReadTimeoutHandler