AhcWSClient

play.api.libs.ws.ahc.AhcWSClient$
See theAhcWSClient companion class
object AhcWSClient

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(config: AhcWSClientConfig, cache: Option[AhcHttpCache])(implicit materializer: Materializer): AhcWSClient

Convenient factory method that uses a play.api.libs.ws.WSClientConfig value for configuration instead of an org.asynchttpclient.AsyncHttpClientConfig.

Convenient factory method that uses a play.api.libs.ws.WSClientConfig value for configuration instead of an org.asynchttpclient.AsyncHttpClientConfig.

Typical usage:

 implicit val materializer = ...
 val client = AhcWSClient()
 val request = client.url(someUrl).get()
 request.foreach { response =>
   doSomething(response)
   client.close()
 }

Value parameters

cache

enables HTTP cache-control, None by default

config

configuration settings, AhcWSClientConfig() by default

Attributes