class WebClient extends AnyRef
An asynchronous HTTP / HTTP/2 client called WebClient
.
The web client makes easy to do HTTP request/response interactions with a web server, and provides advanced features like:
- Json body encoding / decoding
- request/response pumping
- error handling
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.
- Alphabetic
- By Inheritance
- WebClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new WebClient(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Close the client.
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.
-
def
delete(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP DELETE request to send to the server at the specified host and default port.
Create an HTTP DELETE request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
delete(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP DELETE request to send to the server at the specified host and port.
Create an HTTP DELETE request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
delete(requestURI: String): HttpRequest[Buffer]
Create an HTTP DELETE request to send to the server at the default host and port.
Create an HTTP DELETE request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
deleteAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP GET request to send to the server at the specified host and default port.
Create an HTTP GET request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
get(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP GET request to send to the server at the specified host and port.
Create an HTTP GET request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
get(requestURI: String): HttpRequest[Buffer]
Create an HTTP GET request to send to the server at the default host and port.
Create an HTTP GET request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
getAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
head(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP HEAD request to send to the server at the specified host and default port.
Create an HTTP HEAD request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
head(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP HEAD request to send to the server at the specified host and port.
Create an HTTP HEAD request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
head(requestURI: String): HttpRequest[Buffer]
Create an HTTP HEAD request to send to the server at the default host and port.
Create an HTTP HEAD request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
headAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
patch(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP PATCH request to send to the server at the specified host and default port.
Create an HTTP PATCH request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
patch(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP PATCH request to send to the server at the specified host and port.
Create an HTTP PATCH request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
patch(requestURI: String): HttpRequest[Buffer]
Create an HTTP PATCH request to send to the server at the default host and port.
Create an HTTP PATCH request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
patchAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
def
post(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP POST request to send to the server at the specified host and default port.
Create an HTTP POST request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
post(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP POST request to send to the server at the specified host and port.
Create an HTTP POST request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
post(requestURI: String): HttpRequest[Buffer]
Create an HTTP POST request to send to the server at the default host and port.
Create an HTTP POST request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
postAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
def
put(host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP PUT request to send to the server at the specified host and default port.
Create an HTTP PUT request to send to the server at the specified host and default port.
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
put(port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP PUT request to send to the server at the specified host and port.
Create an HTTP PUT request to send to the server at the specified host and port.
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
put(requestURI: String): HttpRequest[Buffer]
Create an HTTP PUT request to send to the server at the default host and port.
Create an HTTP PUT request to send to the server at the default host and port.
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
putAbs(absoluteURI: String): HttpRequest[Buffer]
Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response
Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
def
request(method: HttpMethod, options: RequestOptions): HttpRequest[Buffer]
Create an HTTP request to send to the server at the specified host and port.
Create an HTTP request to send to the server at the specified host and port.
- method
the HTTP method
- options
the request optionssee RequestOptions
- returns
an HTTP client request object
-
def
request(method: HttpMethod, requestURI: String): HttpRequest[Buffer]
Create an HTTP request to send to the server at the default host and port.
Create an HTTP request to send to the server at the default host and port.
- method
the HTTP method
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
request(method: HttpMethod, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP request to send to the server at the specified host and default port.
Create an HTTP request to send to the server at the specified host and default port.
- method
the HTTP method
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
request(method: HttpMethod, port: Int, host: String, requestURI: String): HttpRequest[Buffer]
Create an HTTP request to send to the server at the specified host and port.
Create an HTTP request to send to the server at the specified host and port.
- method
the HTTP method
- port
the port
- host
the host
- requestURI
the relative URI
- returns
an HTTP client request object
-
def
requestAbs(method: HttpMethod, absoluteURI: String): HttpRequest[Buffer]
Create an HTTP request to send to the server using an absolute URI
Create an HTTP request to send to the server using an absolute URI
- method
the HTTP method
- absoluteURI
the absolute URI
- returns
an HTTP client request object
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )