package ws

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class BodyReadable[+R] extends AnyRef
    Annotations
    @implicitNotFound()
  2. class BodyWritable[-A] extends AnyRef

    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.

    Annotations
    @implicitNotFound()
  3. trait DefaultBodyReadables extends AnyRef

    Defines common BodyReadable for a response backed by org.asynchttpclient.Response.

  4. trait DefaultBodyWritables extends AnyRef

    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.

    import scala.concurrent.ExecutionContext
    
    import play.api.libs.ws.StandaloneWSClient
    import play.api.libs.ws.DefaultBodyWritables._
    
    class MyClass(ws: StandaloneWSClient) {
      def postBody()(implicit ec: ExecutionContext) = {
        val getBody: String = "..."
        ws.url("...").post(getBody).map { response => ??? }
      }
    }
  5. case class DefaultWSCookie(name: String, value: String, domain: Option[String] = None, path: Option[String] = None, maxAge: Option[Long] = None, secure: Boolean = false, httpOnly: Boolean = false) extends WSCookie with Product with Serializable
  6. case class DefaultWSProxyServer(host: String, port: Int, protocol: Option[String] = None, principal: Option[String] = None, password: Option[String] = None, ntlmDomain: Option[String] = None, encoding: Option[String] = None, nonProxyHosts: Option[Seq[String]] = None) extends WSProxyServer with Product with Serializable

    A WS proxy.

  7. case class InMemoryBody(bytes: ByteString) extends WSBody with Product with Serializable

    An in memory body

    An in memory body

    bytes

    The bytes of the body

  8. case class SourceBody(source: Source[ByteString, _]) extends WSBody with Product with Serializable

    A body containing a source of bytes

    A body containing a source of bytes

    source

    A flow of the bytes of the body

  9. trait StandaloneWSClient extends Closeable

    The WSClient holds the configuration information needed to build a request, and provides a way to get a request holder.

  10. trait StandaloneWSRequest extends AnyRef

    A WS Request builder.

  11. trait StandaloneWSResponse extends AnyRef

    A WS HTTP response.

  12. trait WSAuthScheme extends AnyRef

  13. sealed trait WSBody extends AnyRef

    A body for the request.

  14. case class WSClientConfig(connectionTimeout: Duration = 2.minutes, idleTimeout: Duration = 2.minutes, requestTimeout: Duration = 2.minutes, followRedirects: Boolean = true, useProxyProperties: Boolean = true, userAgent: Option[String] = None, compressionEnabled: Boolean = false, ssl: SSLConfigSettings = SSLConfigSettings()) extends Product with Serializable

    WS client config

    WS client config

    connectionTimeout

    The maximum time to wait when connecting to the remote host (default is 120 seconds).

    idleTimeout

    The maximum time the request can stay idle (connection is established but waiting for more data) (default is 120 seconds).

    requestTimeout

    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).

    followRedirects

    Configures the client to follow 301 and 302 redirects (default is true).

    useProxyProperties

    To use the JVM system’s HTTP proxy settings (http.proxyHost, http.proxyPort) (default is true).

    userAgent

    To configure the User-Agent header field (default is None).

    compressionEnabled

    Set it to true to use gzip/deflater encoding (default is false).

    ssl

    use custom SSL / TLS configuration, see https://lightbend.github.io/ssl-config/ for documentation.

  15. class WSConfigParser extends Provider[WSClientConfig]

    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

    import play.api.libs.ws.WSConfigParser
    import com.typesafe.config.ConfigFactory
    
    val wsClientConfig = new WSConfigParser(
      ConfigFactory.load(), this.getClass.getClassLoader).parse()
    Annotations
    @Singleton()
  16. trait WSCookie extends AnyRef

    A WS Cookie.

  17. trait WSProxyServer extends AnyRef

    A WS proxy.

  18. trait WSRequestExecutor extends (StandaloneWSRequest) => Future[StandaloneWSResponse]
  19. trait WSRequestFilter extends (WSRequestExecutor) => WSRequestExecutor

    A request filter.

    A request filter. Override this trait to implement your own filters:

    import play.api.libs.ws.{ WSRequestFilter, WSRequestExecutor }
    
    class HeaderAppendingFilter(key: String, value: String) extends WSRequestFilter {
      override def apply(executor: WSRequestExecutor): WSRequestExecutor = {
        WSRequestExecutor(r => executor(r.withHttpHeaders((key, value))))
      }
    }
  20. trait WSSignatureCalculator extends AnyRef

    Sign a WS call with OAuth.

Value Members

  1. object BodyReadable
  2. object BodyWritable
  3. object DefaultBodyReadables extends DefaultBodyReadables
  4. object DefaultBodyWritables extends DefaultBodyWritables
  5. case object EmptyBody extends WSBody with Product with Serializable
  6. object WSAuthScheme
  7. object WSRequestExecutor
  8. object WSRequestFilter

Ungrouped