object AhcWSClient

Source
AhcWSClient.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AhcWSClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def apply(config: AhcWSClientConfig = AhcWSClientConfig(), cache: Option[AhcHttpCache] = None)(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()
    }
    config

    configuration settings, AhcWSClientConfig() by default

    cache

    enables HTTP cache-control, None by default