public final class HttpClientRequestImpl<I,O> extends HttpClientRequest<I,O>
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_REDIRECTS |
| Modifier and Type | Method and Description |
|---|---|
HttpClientRequestImpl<I,O> |
addCookie(io.netty.handler.codec.http.cookie.Cookie cookie)
Adds the passed
cookie to this request. |
HttpClientRequestImpl<I,O> |
addDateHeader(java.lang.CharSequence name,
java.util.Date value)
Adds the passed header as a date value to this request.
|
HttpClientRequestImpl<I,O> |
addDateHeader(java.lang.CharSequence name,
java.lang.Iterable<java.util.Date> values)
Adds multiple date values for the passed header name to this request.
|
HttpClientRequestImpl<I,O> |
addHeader(java.lang.CharSequence name,
java.lang.Object value)
Adds an HTTP header with the passed
name and value to this request. |
HttpClientRequest<I,O> |
addHeaders(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Iterable<java.lang.Object>> headers)
Adds the HTTP headers from the passed
headers to this request. |
HttpClientRequestImpl<I,O> |
addHeaderValues(java.lang.CharSequence name,
java.lang.Iterable<java.lang.Object> values)
Adds an HTTP header with the passed
name and values to this request. |
boolean |
containsHeader(java.lang.CharSequence name)
Checks whether a header with the passed name exists for this request.
|
boolean |
containsHeaderWithValue(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitiveValueMatch)
Checks whether a header with the passed name and value exists for this request.
|
static <I,O> HttpClientRequestImpl<I,O> |
create(io.netty.handler.codec.http.HttpVersion version,
io.netty.handler.codec.http.HttpMethod httpMethod,
java.lang.String uri,
io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client) |
static <I,O> HttpClientRequestImpl<I,O> |
create(io.netty.handler.codec.http.HttpVersion version,
io.netty.handler.codec.http.HttpMethod httpMethod,
java.lang.String uri,
io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client,
int maxRedirects) |
static <I,O> HttpClientRequestImpl<I,O> |
create(RawRequest<I,O> rawRequest,
io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client) |
HttpClientRequestImpl<I,O> |
followRedirects(boolean follow)
Enables/disables following HTTP redirects for the newly created and returned request.
|
HttpClientRequestImpl<I,O> |
followRedirects(int maxRedirects)
Enables following HTTP redirects for the newly created and returned request.
|
java.util.List<java.lang.String> |
getAllHeaders(java.lang.CharSequence name)
Fetches all values of a header, if exists, for this request.
|
io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> |
getClient() |
java.lang.String |
getHeader(java.lang.CharSequence name)
Fetches the value of a header, if exists, for this request.
|
java.util.Set<java.lang.String> |
getHeaderNames()
Returns a new
Set that contains the names of all headers in this request. |
io.netty.handler.codec.http.HttpVersion |
getHttpVersion()
Returns the HTTP version of this request.
|
io.netty.handler.codec.http.HttpMethod |
getMethod()
Returns the HTTP method for this request.
|
java.lang.String |
getUri()
Returns the URI for this request.
|
java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> |
headerIterator()
Returns an iterator over the header entries.
|
HttpClientRequestImpl<I,O> |
readTimeOut(int timeOut,
java.util.concurrent.TimeUnit timeUnit)
Enables read timeout for the response of the newly created and returned request.
|
HttpClientRequestImpl<I,O> |
removeHeader(java.lang.CharSequence name)
Removes the passed header from this request.
|
WebSocketRequestImpl<O> |
requestWebSocketUpgrade()
Creates a new
WebSocketRequest, inheriting all configurations from this request, that will request an
upgrade to websockets from the server. |
HttpClientRequestImpl<I,O> |
setDateHeader(java.lang.CharSequence name,
java.util.Date value)
Overwrites the current value, if any, of the passed header to the passed date value for this request.
|
HttpClientRequestImpl<I,O> |
setDateHeader(java.lang.CharSequence name,
java.lang.Iterable<java.util.Date> values)
Overwrites the current value, if any, of the passed header to the passed date values for this request.
|
HttpClientRequestImpl<I,O> |
setHeader(java.lang.CharSequence name,
java.lang.Object value)
Overwrites the current value, if any, of the passed header to the passed value for this request.
|
HttpClientRequest<I,O> |
setHeaders(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Iterable<java.lang.Object>> headers)
Overwrites the current values, if any, of the passed headers for this request.
|
HttpClientRequestImpl<I,O> |
setHeaderValues(java.lang.CharSequence name,
java.lang.Iterable<java.lang.Object> values)
Overwrites the current value, if any, of the passed header to the passed values for this request.
|
HttpClientRequestImpl<I,O> |
setKeepAlive(boolean keepAlive)
Sets HTTP Connection header to the appropriate value for HTTP keep-alive.
|
HttpClientRequestImpl<I,O> |
setMethod(io.netty.handler.codec.http.HttpMethod method)
Updates the HTTP method of the request and creates a new
HttpClientRequest instance. |
HttpClientRequestImpl<I,O> |
setTransferEncodingChunked()
Sets the HTTP transfer encoding to chunked for this request.
|
HttpClientRequestImpl<I,O> |
setUri(java.lang.String newUri)
Updates the URI of the request and creates a new
HttpClientRequest instance. |
<II> HttpClientRequestImpl<II,O> |
transformContent(io.reactivex.netty.channel.AllocatingTransformer<II,I> transformer)
Creates a new
HttpClientRequest instance modifying the content type using the passed transformer. |
<OO> HttpClientRequestImpl<I,OO> |
transformResponseContent(rx.Observable.Transformer<O,OO> transformer)
Creates a new
HttpClientRequest instance modifying the content type of the response using the
passed transformer. |
RawRequest<I,O> |
unsafeRawRequest() |
rx.Observable<HttpClientResponse<O>> |
writeBytesContent(rx.Observable<byte[]> contentSource)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeBytesContent(rx.Observable<byte[]> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,byte[],T> trailerMutator)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeBytesContent(rx.Observable<byte[]> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,byte[],T> trailerMutator,
rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeBytesContent(rx.Observable<byte[]> contentSource,
rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeContent(rx.Observable<I> contentSource)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeContent(rx.Observable<I> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,I,T> trailerMutator)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeContent(rx.Observable<I> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,I,T> trailerMutator,
rx.functions.Func1<I,java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeContent(rx.Observable<I> contentSource,
rx.functions.Func1<I,java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeContentAndFlushOnEach(rx.Observable<I> contentSource)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeStringContent(rx.Observable<java.lang.String> contentSource)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeStringContent(rx.Observable<java.lang.String> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,java.lang.String,T> trailerMutator)
Uses the passed
Observable as the source of content for this request. |
<T extends TrailingHeaders> |
writeStringContent(rx.Observable<java.lang.String> contentSource,
rx.functions.Func0<T> trailerFactory,
rx.functions.Func2<T,java.lang.String,T> trailerMutator,
rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
rx.Observable<HttpClientResponse<O>> |
writeStringContent(rx.Observable<java.lang.String> contentSource,
rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
Uses the passed
Observable as the source of content for this request. |
all, amb, amb, amb, amb, amb, amb, amb, amb, amb, ambWith, asObservable, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cache, cast, collect, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, compose, concat, concat, concat, concat, concat, concat, concat, concat, concat, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatMap, concatMapEager, concatMapEager, concatWith, contains, count, countLong, create, debounce, debounce, debounce, defaultIfEmpty, defer, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, doOnCompleted, doOnEach, doOnEach, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, doOnUnsubscribe, elementAt, elementAtOrDefault, empty, error, exists, extend, filter, finallyDo, first, first, firstOrDefault, firstOrDefault, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, forEach, forEach, forEach, from, from, from, from, from, fromCallable, groupBy, groupBy, groupJoin, ignoreElements, interval, interval, interval, interval, isEmpty, join, just, just, just, just, just, just, just, just, just, just, last, last, lastOrDefault, lastOrDefault, lift, limit, map, materialize, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, nest, never, observeOn, ofType, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureLatest, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onExceptionResumeNext, publish, publish, range, range, reduce, reduce, repeat, repeat, repeat, repeat, repeatWhen, repeatWhen, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, retry, retry, retry, retryWhen, retryWhen, sample, sample, sample, scan, scan, sequenceEqual, sequenceEqual, serialize, share, single, single, singleOrDefault, singleOrDefault, skip, skip, skip, skipLast, skipLast, skipLast, skipUntil, skipWhile, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, switchIfEmpty, switchMap, switchOnNext, take, take, take, takeFirst, takeLast, takeLast, takeLast, takeLast, takeLast, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeUntil, takeUntil, takeWhile, throttleFirst, throttleFirst, throttleLast, throttleLast, throttleWithTimeout, throttleWithTimeout, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, timer, timer, timestamp, timestamp, toBlocking, toList, toMap, toMap, toMap, toMultimap, toMultimap, toMultimap, toMultimap, toSingle, toSortedList, toSortedList, toSortedList, toSortedList, unsafeSubscribe, unsubscribeOn, using, using, window, window, window, window, window, window, window, window, window, window, window, window, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWithpublic static final int NO_REDIRECTS
public rx.Observable<HttpClientResponse<O>> writeContent(rx.Observable<I> contentSource)
HttpClientRequestObservable as the source of content for this request.writeContent in class HttpClientRequest<I,O>contentSource - Content source for the request.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeContentAndFlushOnEach(rx.Observable<I> contentSource)
HttpClientRequestObservable as the source of content for this request. Every item is written and flushed
immediately.writeContentAndFlushOnEach in class HttpClientRequest<I,O>contentSource - Content source for the request.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeStringContent(rx.Observable<java.lang.String> contentSource)
HttpClientRequestObservable as the source of content for this request.writeStringContent in class HttpClientRequest<I,O>contentSource - Content source for the request.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeBytesContent(rx.Observable<byte[]> contentSource)
HttpClientRequestObservable as the source of content for this request.writeBytesContent in class HttpClientRequest<I,O>contentSource - Content source for the request.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeContent(rx.Observable<I> contentSource, rx.functions.Func1<I,java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request.writeContent in class HttpClientRequest<I,O>contentSource - Content source for the request.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeStringContent(rx.Observable<java.lang.String> contentSource, rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request.writeStringContent in class HttpClientRequest<I,O>contentSource - Content source for the request.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public rx.Observable<HttpClientResponse<O>> writeBytesContent(rx.Observable<byte[]> contentSource, rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request.writeBytesContent in class HttpClientRequest<I,O>contentSource - Content source for the request.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeContent(rx.Observable<I> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,I,T> trailerMutator)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeStringContent(rx.Observable<java.lang.String> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,java.lang.String,T> trailerMutator)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeStringContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeBytesContent(rx.Observable<byte[]> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,byte[],T> trailerMutator)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeBytesContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeContent(rx.Observable<I> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,I,T> trailerMutator, rx.functions.Func1<I,java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeStringContent(rx.Observable<java.lang.String> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,java.lang.String,T> trailerMutator, rx.functions.Func1<java.lang.String,java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeStringContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public <T extends TrailingHeaders> rx.Observable<HttpClientResponse<O>> writeBytesContent(rx.Observable<byte[]> contentSource, rx.functions.Func0<T> trailerFactory, rx.functions.Func2<T,byte[],T> trailerMutator, rx.functions.Func1<byte[],java.lang.Boolean> flushSelector)
HttpClientRequestObservable as the source of content for this request. This method provides a way to
write trailing headers.
A new instance of TrailingHeaders will be created using the passed trailerFactory and the passed
trailerMutator will be invoked for every item emitted from the content source, giving a chance to modify
the trailing headers instance.writeBytesContent in class HttpClientRequest<I,O>contentSource - Content source for the request.trailerFactory - A factory function to create a new TrailingHeaders per subscription of the content.trailerMutator - A function to mutate the trailing header on each item emitted from the content source.flushSelector - A Func1 which is invoked for every item emitted from msgs. All pending
writes are flushed, iff this function returns, true.Observable which can be subscribed to execute the request.public HttpClientRequestImpl<I,O> readTimeOut(int timeOut, java.util.concurrent.TimeUnit timeUnit)
HttpClientRequestreadTimeOut in class HttpClientRequest<I,O>timeOut - Read timeout duration.timeUnit - Read timeout time unit.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> followRedirects(int maxRedirects)
HttpClientRequestfollowRedirects in class HttpClientRequest<I,O>maxRedirects - Maximum number of redirects allowed.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> followRedirects(boolean follow)
HttpClientRequestfollowRedirects in class HttpClientRequest<I,O>follow - true for enabling redirects, false to disable.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setMethod(io.netty.handler.codec.http.HttpMethod method)
HttpClientRequestHttpClientRequest instance.setMethod in class HttpClientRequest<I,O>method - New HTTP method to use.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setUri(java.lang.String newUri)
HttpClientRequestHttpClientRequest instance.setUri in class HttpClientRequest<I,O>newUri - New URI to use.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> addHeader(java.lang.CharSequence name, java.lang.Object value)
HttpClientRequestname and value to this request.addHeader in class HttpClientRequest<I,O>name - Name of the header.value - Value for the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequest<I,O> addHeaders(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Iterable<java.lang.Object>> headers)
HttpClientRequestheaders to this request.addHeaders in class HttpClientRequest<I,O>headers - Map of the headers.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> addCookie(io.netty.handler.codec.http.cookie.Cookie cookie)
HttpClientRequestcookie to this request.addCookie in class HttpClientRequest<I,O>cookie - Cookie to add.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> addDateHeader(java.lang.CharSequence name, java.util.Date value)
HttpClientRequestHttpHeaders.addDateHeader(HttpMessage, CharSequence, Date) which formats the date as per the HTTP specifications into the format:
"E, dd MMM yyyy HH:mm:ss z"
addDateHeader in class HttpClientRequest<I,O>name - Name of the header.value - Value of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> addDateHeader(java.lang.CharSequence name, java.lang.Iterable<java.util.Date> values)
HttpClientRequestHttpHeaders.addDateHeader(HttpMessage, CharSequence, Date) which formats the date as per the HTTP specifications into the format:
"E, dd MMM yyyy HH:mm:ss z"
addDateHeader in class HttpClientRequest<I,O>name - Name of the header.values - Values for the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> addHeaderValues(java.lang.CharSequence name, java.lang.Iterable<java.lang.Object> values)
HttpClientRequestname and values to this request.addHeaderValues in class HttpClientRequest<I,O>name - Name of the header.values - Values for the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setDateHeader(java.lang.CharSequence name, java.util.Date value)
HttpClientRequestHttpHeaders.addDateHeader(HttpMessage, CharSequence, Date) which formats the date
as per the HTTP specifications into
the format:
"E, dd MMM yyyy HH:mm:ss z"
setDateHeader in class HttpClientRequest<I,O>name - Name of the header.value - Value of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setHeader(java.lang.CharSequence name, java.lang.Object value)
HttpClientRequestsetHeader in class HttpClientRequest<I,O>name - Name of the header.value - Value of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequest<I,O> setHeaders(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Iterable<java.lang.Object>> headers)
HttpClientRequestsetHeaders in class HttpClientRequest<I,O>headers - Map of the headers.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setDateHeader(java.lang.CharSequence name, java.lang.Iterable<java.util.Date> values)
HttpClientRequestHttpHeaders.addDateHeader(HttpMessage, CharSequence, Date) which formats the
date as per the HTTP specifications
into the format:
"E, dd MMM yyyy HH:mm:ss z"
setDateHeader in class HttpClientRequest<I,O>name - Name of the header.values - Values of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setHeaderValues(java.lang.CharSequence name, java.lang.Iterable<java.lang.Object> values)
HttpClientRequestsetHeaderValues in class HttpClientRequest<I,O>name - Name of the header.values - Values of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> removeHeader(java.lang.CharSequence name)
HttpClientRequestremoveHeader in class HttpClientRequest<I,O>name - Name of the header.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setKeepAlive(boolean keepAlive)
HttpClientRequestHttpHeaders.setKeepAlive(HttpMessage, boolean)setKeepAlive in class HttpClientRequest<I,O>keepAlive - true to enable keep alive.HttpClientRequest sharing all existing state from this request.public HttpClientRequestImpl<I,O> setTransferEncodingChunked()
HttpClientRequestHttpHeaders.setTransferEncodingChunked(HttpMessage)setTransferEncodingChunked in class HttpClientRequest<I,O>HttpClientRequest sharing all existing state from this request.public <II> HttpClientRequestImpl<II,O> transformContent(io.reactivex.netty.channel.AllocatingTransformer<II,I> transformer)
HttpClientRequestHttpClientRequest instance modifying the content type using the passed transformer.transformContent in class HttpClientRequest<I,O>II - New type of the content.transformer - Transformer to transform the content stream.HttpClientRequest with the transformed content stream.public <OO> HttpClientRequestImpl<I,OO> transformResponseContent(rx.Observable.Transformer<O,OO> transformer)
HttpClientRequestHttpClientRequest instance modifying the content type of the response using the
passed transformer.transformResponseContent in class HttpClientRequest<I,O>OO - New type of the content.transformer - Transformer to transform the content stream.HttpClientRequest with the transformed response content stream.public WebSocketRequestImpl<O> requestWebSocketUpgrade()
HttpClientRequestWebSocketRequest, inheriting all configurations from this request, that will request an
upgrade to websockets from the server.requestWebSocketUpgrade in class HttpClientRequest<I,O>WebSocketRequest.public boolean containsHeader(java.lang.CharSequence name)
HttpClientRequestcontainsHeader in class HttpClientRequest<I,O>name - Header name.true if the header exists.public boolean containsHeaderWithValue(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitiveValueMatch)
HttpClientRequestcontainsHeaderWithValue in class HttpClientRequest<I,O>name - Header name.value - Value to check.caseInsensitiveValueMatch - If the value has to be matched ignoring case.true if the header with the passed value exists.public java.lang.String getHeader(java.lang.CharSequence name)
HttpClientRequestgetHeader in class HttpClientRequest<I,O>name - Name of the header.null otherwise. If there are multiple values for this
header, the first value is returned.public java.util.List<java.lang.String> getAllHeaders(java.lang.CharSequence name)
HttpClientRequestgetAllHeaders in class HttpClientRequest<I,O>name - Name of the header.null otherwise.public java.util.Iterator<java.util.Map.Entry<java.lang.CharSequence,java.lang.CharSequence>> headerIterator()
HttpClientRequestheaderIterator in class HttpClientRequest<I,O>public java.util.Set<java.lang.String> getHeaderNames()
HttpClientRequestSet that contains the names of all headers in this request. Note that modifying the
returned Set will not affect the state of this response.getHeaderNames in class HttpClientRequest<I,O>public io.netty.handler.codec.http.HttpVersion getHttpVersion()
HttpClientRequestgetHttpVersion in class HttpClientRequest<I,O>public io.netty.handler.codec.http.HttpMethod getMethod()
HttpClientRequestgetMethod in class HttpClientRequest<I,O>public java.lang.String getUri()
HttpClientRequestgetUri in class HttpClientRequest<I,O>public static <I,O> HttpClientRequestImpl<I,O> create(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpMethod httpMethod, java.lang.String uri, io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client, int maxRedirects)
public static <I,O> HttpClientRequestImpl<I,O> create(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpMethod httpMethod, java.lang.String uri, io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client)
public static <I,O> HttpClientRequestImpl<I,O> create(RawRequest<I,O> rawRequest, io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> client)
public io.reactivex.netty.protocol.tcp.client.TcpClient<?,HttpClientResponse<O>> getClient()
public RawRequest<I,O> unsafeRawRequest()