Trait

play.api.libs.ws

WSRequest

Related Doc: package ws

Permalink

trait WSRequest extends AnyRef

A WS Request builder.

Source
WS.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WSRequest
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val auth: Option[(String, String, WSAuthScheme)]

    Permalink

    The authentication this request should use

  2. abstract val body: WSBody

    Permalink

    The body of this request

  3. abstract val calc: Option[WSSignatureCalculator]

    Permalink

    A calculator of the signature for this request

  4. abstract def execute(): Future[WSResponse]

    Permalink

    Execute this request

  5. abstract val followRedirects: Option[Boolean]

    Permalink

    Whether this request should follow redirects

  6. abstract val headers: Map[String, Seq[String]]

    Permalink

    The headers for this request

  7. abstract val method: String

    Permalink

    The method for this request

  8. abstract val proxyServer: Option[WSProxyServer]

    Permalink

    The proxy server this request will use

  9. abstract val queryString: Map[String, Seq[String]]

    Permalink

    The query string for this request

  10. abstract val requestTimeout: Option[Int]

    Permalink

    The timeout for the request

  11. abstract def sign(calc: WSSignatureCalculator): WSRequest

    Permalink

    sets the signature calculator for the request

  12. abstract def stream(): Future[StreamedResponse]

    Permalink

    Execute this request and stream the response body.

  13. abstract val url: String

    Permalink

    The base URL for this request

  14. abstract val virtualHost: Option[String]

    Permalink

    The virtual host this request will use

  15. abstract def withAuth(username: String, password: String, scheme: WSAuthScheme): WSRequest

    Permalink

    sets the authentication realm

  16. abstract def withBody(body: WSBody): WSRequest

    Permalink

    Sets the body for this request

  17. abstract def withFollowRedirects(follow: Boolean): WSRequest

    Permalink

    Sets whether redirects (301, 302) should be followed automatically

  18. abstract def withHeaders(hdrs: (String, String)*): WSRequest

    Permalink

    adds any number of HTTP headers

  19. abstract def withMethod(method: String): WSRequest

    Permalink

    Sets the method for this request

  20. abstract def withProxyServer(proxyServer: WSProxyServer): WSRequest

    Permalink

    Sets the proxy server to use in this request

  21. abstract def withQueryString(parameters: (String, String)*): WSRequest

    Permalink

    adds any number of query string parameters to this request

  22. abstract def withRequestFilter(filter: WSRequestFilter): WSRequest

    Permalink

    Adds a filter to the request that can transform the request for subsequent filters.

  23. abstract def withRequestTimeout(timeout: Duration): WSRequest

    Permalink

    Sets the maximum time you expect the request to take.

    Sets the maximum time you expect the request to take. Use Duration.Inf to set an infinite request timeout. Warning: a stream consumption will be interrupted when this time is reached unless Duration.Inf is set.

  24. abstract def withVirtualHost(vh: String): WSRequest

    Permalink

    Sets the virtual host to use in this request

  25. abstract def streamWithEnumerator(): Future[(WSResponseHeaders, Enumerator[Array[Byte]])]

    Permalink

    Execute this request and stream the response body.

    Execute this request and stream the response body.

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.stream() instead.) 2.5.0

    Note

    This method used to be named stream, but it was renamed because the method's signature was changed and the JVM doesn't allow overloading on the return type.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def delete(): Future[WSResponse]

    Permalink

    Perform a DELETE on the request asynchronously.

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def execute(method: String): Future[WSResponse]

    Permalink
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get(): Future[WSResponse]

    Permalink

    performs a get

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. def head(): Future[WSResponse]

    Permalink

    Perform a HEAD on the request asynchronously.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def options(): Future[WSResponse]

    Permalink

    Perform a OPTIONS on the request asynchronously.

  20. def patch(body: Source[Part[Source[ByteString, _]], _]): Future[WSResponse]

    Permalink

    Perform a PATCH on the request asynchronously.

  21. def patch(body: File): Future[WSResponse]

    Permalink

    Perform a PATCH on the request asynchronously.

    Perform a PATCH on the request asynchronously. Request body won't be chunked

  22. def patch[T](body: T)(implicit wrt: Writeable[T]): Future[WSResponse]

    Permalink

    Perform a PATCH on the request asynchronously.

  23. def post(body: Source[Part[Source[ByteString, _]], _]): Future[WSResponse]

    Permalink

    Perform a POST on the request asynchronously.

  24. def post(body: File): Future[WSResponse]

    Permalink

    Perform a POST on the request asynchronously.

    Perform a POST on the request asynchronously. Request body won't be chunked

  25. def post[T](body: T)(implicit wrt: Writeable[T]): Future[WSResponse]

    Permalink

    Perform a POST on the request asynchronously.

  26. def put(body: Source[Part[Source[ByteString, _]], _]): Future[WSResponse]

    Permalink

    Perform a PUT on the request asynchronously.

  27. def put(body: File): Future[WSResponse]

    Permalink

    Perform a PUT on the request asynchronously.

    Perform a PUT on the request asynchronously. Request body won't be chunked

  28. def put[T](body: T)(implicit wrt: Writeable[T]): Future[WSResponse]

    Permalink

    Perform a PUT on the request asynchronously.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. lazy val uri: URI

    Permalink

    The URI for this request

  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withBody[T](body: T)(implicit wrt: Writeable[T]): WSRequest

    Permalink

    Sets the body for this request

Deprecated Value Members

  1. def get[A](consumer: (WSResponseHeaders) ⇒ Iteratee[Array[Byte], A])(implicit ec: ExecutionContext): Future[Iteratee[Array[Byte], A]]

    Permalink

    performs a get

    performs a get

    consumer

    that's handling the response

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.withMethod("GET").stream()) 2.5.0

  2. def getStream(): Future[(WSResponseHeaders, Enumerator[Array[Byte]])]

    Permalink

    performs a get

    performs a get

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.withMethod("GET").stream()) 2.5.0

  3. def patchAndRetrieveStream[A, T](body: T)(consumer: (WSResponseHeaders) ⇒ Iteratee[Array[Byte], A])(implicit wrt: Writeable[T], ec: ExecutionContext): Future[Iteratee[Array[Byte], A]]

    Permalink

    performs a POST with supplied body

    performs a POST with supplied body

    consumer

    that's handling the response

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.withMethod("PATCH").stream()) 2.5.0

  4. def postAndRetrieveStream[A, T](body: T)(consumer: (WSResponseHeaders) ⇒ Iteratee[Array[Byte], A])(implicit wrt: Writeable[T], ec: ExecutionContext): Future[Iteratee[Array[Byte], A]]

    Permalink

    performs a POST with supplied body

    performs a POST with supplied body

    consumer

    that's handling the response

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.withMethod("POST").stream()) 2.5.0

  5. def putAndRetrieveStream[A, T](body: T)(consumer: (WSResponseHeaders) ⇒ Iteratee[Array[Byte], A])(implicit wrt: Writeable[T], ec: ExecutionContext): Future[Iteratee[Array[Byte], A]]

    Permalink

    performs a PUT with supplied body

    performs a PUT with supplied body

    consumer

    that's handling the response

    Annotations
    @deprecated
    Deprecated

    (Since version Use WS.withMethod("PUT").stream()) 2.5.0

Inherited from AnyRef

Inherited from Any

Ungrouped