Package

play.api.libs

ws

Permalink

package ws

Visibility
  1. Public
  2. All

Type Members

  1. class BodyReadable[+R] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  2. class BodyWritable[-A] extends AnyRef

    Permalink

    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

    Permalink

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

  4. trait DefaultBodyWritables extends AnyRef

    Permalink

    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 => ... }
      }
    }
  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

    Permalink
  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

    Permalink

    A WS proxy.

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    A WS Request builder.

  11. trait StandaloneWSResponse extends AnyRef

    Permalink

    A WS HTTP response.

  12. trait WSAuthScheme extends AnyRef

    Permalink

  13. sealed trait WSBody extends AnyRef

    Permalink

    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

    Permalink

    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://typesafehub.github.io/ssl-config/ for documentation.

  15. class WSConfigParser extends Provider[WSClientConfig]

    Permalink

    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()
    Annotations
    @Singleton()
  16. trait WSCookie extends AnyRef

    Permalink

    A WS Cookie.

  17. trait WSProxyServer extends AnyRef

    Permalink

    A WS proxy.

  18. trait WSRequestExecutor extends (StandaloneWSRequest) ⇒ Future[StandaloneWSResponse]

    Permalink
  19. trait WSRequestFilter extends (WSRequestExecutor) ⇒ WSRequestExecutor

    Permalink

    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))))
      }
    }
  20. trait WSSignatureCalculator extends AnyRef

    Permalink

    Sign a WS call with OAuth.

Value Members

  1. object BodyReadable

    Permalink
  2. object BodyWritable

    Permalink
  3. object DefaultBodyReadables extends DefaultBodyReadables

    Permalink
  4. object DefaultBodyWritables extends DefaultBodyWritables

    Permalink
  5. object EmptyBody extends WSBody with Product with Serializable

    Permalink
  6. object WSAuthScheme

    Permalink
  7. object WSRequestExecutor

    Permalink
  8. object WSRequestFilter

    Permalink

Ungrouped