An asynchronous HTTP / HTTP/2 client called <code>WebClient</code>.
The web client makes easy to do HTTP request/response interactions with a web server, and provides advanced features like:
The web client does not deprecate the , it is actually based on it and therefore inherits
its configuration and great features like pooling. The HttpClient should be used when fine grained control over the HTTP
requests/response is necessary.
| package |
Default |
|---|
__construct()
close() : void
Clients should always be closed after use.
create( $arg0, $arg1 = null) : \io\vertx\jphp\ext\web\client\WebClient
param $vertx [Vertx] the vertx instance create($vertx)
Create a web client using the provided vertx instance.
param $vertx [Vertx] the vertx instance param $options [WebClientOptions | array] the Web Client options create($vertx, $options)
Vertx
WebClientOptions | array
\io\vertx\jphp\ext\web\client\WebClientthe created web client
delete( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI delete($requestURI)
Create an HTTP DELETE request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI delete($host, $requestURI)
Create an HTTP DELETE request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI delete($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
deleteAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
get( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI get($requestURI)
Create an HTTP GET request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI get($host, $requestURI)
Create an HTTP GET request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI get($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
getAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
head( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI head($requestURI)
Create an HTTP HEAD request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI head($host, $requestURI)
Create an HTTP HEAD request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI head($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
headAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
patch( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI patch($requestURI)
Create an HTTP PATCH request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI patch($host, $requestURI)
Create an HTTP PATCH request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI patch($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
patchAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
post( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI post($requestURI)
Create an HTTP POST request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI post($host, $requestURI)
Create an HTTP POST request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI post($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
postAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
put( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $requestURI [string] the relative URI put($requestURI)
Create an HTTP PUT request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI put($host, $requestURI)
Create an HTTP PUT request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI put($port, $host, $requestURI)
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
putAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
raw( $arg0, $arg1, $arg2 = null, $arg3 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $customHttpMethod [string] custom HTTP Method param $requestURI [string] the relative URI raw($customHttpMethod, $requestURI)
Create a request with a custom HTTP method to send to the server at the specified host and default port.
param $customHttpMethod [string] custom HTTP Method param $host [string] the host param $requestURI [string] the relative URI raw($customHttpMethod, $host, $requestURI)
Create a request with a custom HTTP method to send to the server at the specified host and port.
param $customHttpMethod [string] custom HTTP Method param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI raw($customHttpMethod, $port, $host, $requestURI)
string
string | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
rawAbs( $arg0, $arg1) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
request( $arg0, $arg1, $arg2 = null, $arg3 = null, $arg4 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $method [string] the HTTP method param $requestURI [string] the relative URI request($method, $requestURI)
Create an HTTP request to send to the server at the specified host and port.
param $method [string] the HTTP method param $options [RequestOptions | array] the request options request($method, $options)
Create an HTTP request to send to the server at the specified host and default port.
param $method [string] the HTTP method param $host [string] the host param $requestURI [string] the relative URI request($method, $host, $requestURI)
Like @see \io\vertx\jphp\ext\web\client\WebClient::request using the serverAddress parameter to connect to the
server instead of the default port and default host.
The request host header will still be created from the default port and default host.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $requestURI [string]
request($method, $serverAddress, $requestURI)
Like @see \io\vertx\jphp\ext\web\client\WebClient::request using the serverAddress parameter to connect to the
server instead of the options parameter.
The request host header will still be created from the options parameter.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $options [RequestOptions | array]
request($method, $serverAddress, $options)
Create an HTTP request to send to the server at the specified host and port.
param $method [string] the HTTP method
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
request($method, $port, $host, $requestURI)
Like @see \io\vertx\jphp\ext\web\client\WebClient::request using the serverAddress parameter to connect to the
server instead of the default port and host parameter.
The request host header will still be created from the default port and host parameter.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $host [string]
param $requestURI [string]
request($method, $serverAddress, $host, $requestURI)
Like @see \io\vertx\jphp\ext\web\client\WebClient::request using the serverAddress parameter to connect to the
server instead of the port and host parameters.
The request host header will still be created from the port and host parameters.
Use to connect to a unix domain socket server. param $method [string] param $serverAddress [SocketAddress] param $port [integer] param $host [string] param $requestURI [string] request($method, $serverAddress, $port, $host, $requestURI)
string
string | RequestOptions | array | integer | SocketAddress
string | RequestOptions | array | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
requestAbs( $arg0, $arg1, $arg2 = null) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
param $method [string] the HTTP method param $absoluteURI [string] the absolute URI requestAbs($method, $absoluteURI)
Like @see \io\vertx\jphp\ext\web\client\WebClient::requestAbs using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the absoluteURI parameter.
Use to connect to a unix domain socket server. param $method [string] param $serverAddress [SocketAddress] param $absoluteURI [string] requestAbs($method, $serverAddress, $absoluteURI)
string
string | SocketAddress
string
\io\vertx\jphp\ext\web\client\HttpRequestan HTTP client request object
wrap( $arg0, $arg1 = null) : \io\vertx\jphp\ext\web\client\WebClient
param $httpClient [HttpClient] the HttpClient to wrap wrap($httpClient)
Wrap an httpClient with a web client and default options.
Only the specific web client portion of the options is used, the @see \io\vertx\jphp\core\http\HttpClientOptions
of the httpClient is reused.
param $httpClient [HttpClient] the [HttpClient](../classes/io.vertx.jphp.core.http.HttpClient.html) to wrap
param $options [WebClientOptions | array] the Web Client options
wrap($httpClient, $options)
HttpClient
WebClientOptions | array
\io\vertx\jphp\ext\web\client\WebClientthe web client