This is a type class pattern for writing different types of bodies to a WS request.
This is a type class pattern for writing different types of bodies to a WS request.
Defines common BodyReadable for a response backed by org.asynchttpclient.Response.
Default BodyWritable for a request body, for use with requests that take a body such as PUT, POST and PATCH.
Default BodyWritable for a request body, for use with requests that take a body such as PUT, POST and PATCH.
class MyClass extends DefaultBodyWritables { def postBody() = { val getBody: String = ... ws.url(...).post(getBody).map { response => ... } } }
A WS proxy.
An in memory body
An in memory body
The bytes of the body
A body containing a source of bytes
A body containing a source of bytes
A flow of the bytes of the body
The WSClient holds the configuration information needed to build a request, and provides a way to get a request holder.
A WS Request builder.
A WS HTTP response.
A body for the request.
WS client config
WS client config
The maximum time to wait when connecting to the remote host (default is 120 seconds).
The maximum time the request can stay idle (connection is established but waiting for more data) (default is 120 seconds).
The total time you accept a request to take (it will be interrupted even if the remote host is still sending data) (default is 120 seconds).
Configures the client to follow 301 and 302 redirects (default is true).
To use the JVM system’s HTTP proxy settings (http.proxyHost, http.proxyPort) (default is true).
To configure the User-Agent header field (default is None).
Set it to true to use gzip/deflater encoding (default is false).
use custom SSL / TLS configuration, see https://typesafehub.github.io/ssl-config/ for documentation.
This class creates a WSClientConfig object from a Typesafe Config object.
This class creates a WSClientConfig object from a Typesafe Config object.
You can create a client config from an application.conf file by running
val wsClientConfig = new WSConfigParser(ConfigFactory.load(), this.classLoader).parse()
A WS Cookie.
A WS proxy.
A request filter.
A request filter. Override this trait to implement your own filters:
class HeaderAppendingFilter(key: String, value: String) extends WSRequestFilter { override def apply(executor: WSRequestExecutor): WSRequestExecutor = { WSRequestExecutor(r => executor(r.withHeaders((key, value)))) } }
Sign a WS call with OAuth.