play.api.libs

ws

package ws

Asynchronous API to to query web services, as an http client.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ws
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class DefaultWSClientConfig(connectionTimeout: Option[Long] = None, idleTimeout: Option[Long] = None, requestTimeout: Option[Long] = None, followRedirects: Option[Boolean] = None, useProxyProperties: Option[Boolean] = None, userAgent: Option[String] = None, compressionEnabled: Option[Boolean] = None, acceptAnyCertificate: Option[Boolean] = None, ssl: Option[SSLConfig] = None) extends WSClientConfig with Product with Serializable

    Default client config option.

  2. class DefaultWSConfigParser extends Provider[WSClientConfig]

    This class creates a DefaultWSClientConfig object from the play.api.Configuration.

    This class creates a DefaultWSClientConfig object from the play.api.Configuration.

    Annotations
    @Singleton()
  3. 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.

  4. case class DefaultWSResponseHeaders(status: Int, headers: Map[String, Seq[String]]) extends WSResponseHeaders with Product with Serializable

  5. case class FileBody(file: File) extends WSBody with Product with Serializable

    A file body

  6. case class InMemoryBody(bytes: Array[Byte]) extends WSBody with Product with Serializable

    An in memory body

    An in memory body

    bytes

    The bytes of the body

  7. case class StreamedBody(bytes: Enumerator[Array[Byte]]) extends WSBody with Product with Serializable

    A streamed body

    A streamed body

    bytes

    An enumerator of the bytes of the body

  8. trait WSAPI extends AnyRef

    The base WS API trait.

    The base WS API trait. Plugins should extend this.

  9. trait WSAuthScheme extends AnyRef

  10. sealed trait WSBody extends AnyRef

    A body for the request

  11. trait WSClient extends AnyRef

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

  12. trait WSClientConfig extends AnyRef

    A WSConfiguration trait.

    A WSConfiguration trait. This provides bindings that can be passed into any implementation of WSClient.

  13. trait WSCookie extends AnyRef

    A WS Cookie.

    A WS Cookie. This is a trait so that we are not tied to a specific client.

  14. trait WSProxyServer extends AnyRef

    A WS proxy.

  15. trait WSRequest extends AnyRef

    WSRequest is used internally.

    WSRequest is used internally. Please use WSRequestHolder.

  16. trait WSRequestHolder extends AnyRef

    A WS Request builder.

  17. trait WSRequestHolderMagnet extends AnyRef

    WSRequestHolderMagnet magnet.

    WSRequestHolderMagnet magnet. Please see the companion object for implicit definitions.

    See also

    The magnet pattern

  18. trait WSResponse extends AnyRef

  19. trait WSResponseHeaders extends AnyRef

    An HTTP response header (the body has not been retrieved yet)

  20. trait WSSignatureCalculator extends AnyRef

    Sign a WS call.

  21. type Cookie = WSCookie

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0) Use WSCookie

  22. type ProxyServer = DefaultWSProxyServer

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0) Use DefaultWSProxyServer

  23. type Response = WSResponse

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0) Use WSResponse

  24. type ResponseHeaders = DefaultWSResponseHeaders

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0) Use DefaultWSResponseHeaders

  25. type SignatureCalculator = WSSignatureCalculator

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.0) Use WSSignatureCalculator

Value Members

  1. object Defaults

  2. object EmptyBody extends WSBody with Product with Serializable

    An empty body

  3. object WS

    Asynchronous API to to query web services, as an http client.

    Asynchronous API to to query web services, as an http client.

    Usage example:

    WS.url("http://example.com/feed").get()
    WS.url("http://example.com/item").post("content")

    When greater flexibility is needed, you can also create clients explicitly and pass them into WS:

    implicit val client = new NingWSClient(builder.build())
    WS.url("http://example.com/feed").get()

    Or call the client directly:

    import com.typesafe.config.ConfigFactory
    import play.api.libs.ws._
    import play.api.libs.ws.ning._
    
    val configuration = play.api.Configuration(ConfigFactory.parseString(
    """
      |ws.ssl.trustManager = ...
    """.stripMargin))
    val parser = new DefaultWSConfigParser(configuration, Play.current.classloader)
    val builder = new NingAsyncHttpClientConfigBuilder(parser.parse())
    val secureClient : WSClient = new NingWSClient(builder.build())
    val response = secureClient.url("https://secure.com").get()

    Note that the resolution of URL is done through the magnet pattern defined in WSRequestHolderMagnet.

    The value returned is a Future[WSResponse], and you should use Play's asynchronous mechanisms to use this response.

  4. object WSAuthScheme

  5. package ning

  6. package ssl

Inherited from AnyRef

Inherited from Any

Ungrouped