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\WebClient
the 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\HttpRequest
an HTTP client request object
deleteAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\HttpRequest
an HTTP client request object
getAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\HttpRequest
an HTTP client request object
headAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\HttpRequest
an HTTP client request object
patchAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\HttpRequest
an HTTP client request object
postAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\HttpRequest
an HTTP client request object
putAbs( $arg0) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
\io\vertx\jphp\ext\web\client\HttpRequest
an HTTP client request object
request( $arg0, $arg1, $arg2 = null, $arg3 = 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)
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)
string
string | RequestOptions | array | integer
string
string
\io\vertx\jphp\ext\web\client\HttpRequest
an HTTP client request object
requestAbs( $arg0, $arg1) : \io\vertx\jphp\ext\web\client\HttpRequest<Buffer>
string
string
\io\vertx\jphp\ext\web\client\HttpRequest
an 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\WebClient
the web client