Java io.vertx.core.http HttpClientRequest fields, constructors, methods, implement or subclass

Example usage for Java io.vertx.core.http HttpClientRequest fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for io.vertx.core.http HttpClientRequest.

The text is from its open source code.

Implementation

io.vertx.core.http.HttpClientRequest has the following implementations.
Click this link to see all its implementation.

Method

StringabsoluteURI()
HttpConnectionconnection()
HttpClientRequestcontinueHandler(@Nullable Handler handler)
If you send an HTTP request with the header Expect set to the value 100-continue and the server responds with an interim HTTP response with a status code of 100 and a continue handler has been set using this method, then the handler will be called.
Futureend(String chunk)
Same as #end(Buffer) but writes a String in UTF-8 encoding
Futureend(Buffer chunk)
Same as #end() but writes some data to the request body before ending.
voidend(Handler> handler)
Same as #end() but with an handler called when the operation completes
Futureend()
Ends the request.
voidend(String chunk, Handler> handler)
Same as #end(String) but with an handler called when the operation completes
Futureend(String chunk, String enc)
Same as #end(Buffer) but writes a String with the specified encoding
voidend(Buffer chunk, Handler> handler)
Same as #end(String) but with an handler called when the operation completes
HttpClientRequestexceptionHandler(Handler handler)
MultiMapheaders()
booleanisChunked()
HttpMethodmethod()
The HTTP method for the request.
Stringpath()
HttpClientRequestpushHandler(Handler handler)
Set a push handler for this request.

The handler is called when the client receives a push promise from the server.

HttpClientRequestputHeader(String name, String value)
Put an HTTP header
HttpClientRequestputHeader(CharSequence name, CharSequence value)
Like #putHeader(String,String) but using CharSequence
HttpClientRequestputHeader(String name, Iterable values)
Put an HTTP header with multiple values
HttpClientRequestputHeader(CharSequence name, Iterable values)
Like #putHeader(String,Iterable) but using CharSequence
Stringquery()
booleanreset()
Reset this stream with the error code 0 .
booleanreset(long code)
Reset this request:

  • for HTTP/2, this performs send an HTTP/2 reset frame with the specified error code
  • for HTTP/1.x, this closes the connection when the current request is inflight

When the request has not yet been sent, the request will be aborted and false is returned as indicator.

FuturesendHead()
Forces the head of the request to be written before #end() is called on the request or any data is written to it.
HttpClientRequestsetChunked(boolean chunked)
If chunked is true then the request will be set into HTTP chunked mode
HttpClientRequestsetFollowRedirects(boolean followRedirects)
Set the request to follow HTTP redirects up to HttpClientOptions#getMaxRedirects() .
HttpClientRequestsetHost(String host)
Set the request host.

For HTTP/2 it sets the :authority pseudo header otherwise it sets the Host header

HttpClientRequestsetRawMethod(String method)
Set the value the method to send when the method HttpMethod#OTHER is used.
HttpClientRequestsetTimeout(long timeoutMs)
Set's the amount of time after which if the request does not return any data within the timeout period an java.util.concurrent.TimeoutException will be passed to the exception handler (if provided) and the request will be closed.
Stringuri()
Futurewrite(String chunk)
Write a String to the request body, encoded as UTF-8.
HttpClientRequestwriteCustomFrame(int type, int flags, Buffer payload)
Write an HTTP/2 frame to the request, allowing to extend the HTTP/2 protocol.

The frame is sent immediatly and is not subject to flow control.

This method must be called after the request headers have been sent and only for the protocol HTTP/2.