ResultExtractors

play.api.test.ResultExtractors

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Helpers
Self type

Members list

Value members

Concrete methods

def charset(of: Future[Result])(implicit timeout: Timeout): Option[String]

Extracts the Charset of this Result value.

Extracts the Charset of this Result value.

Attributes

def charset(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Option[String]

Extracts the Charset of this Result value.

Extracts the Charset of this Result value.

Attributes

def contentAsBytes(of: Content)(implicit timeout: Timeout): Array[Byte]

Extracts the content as bytes.

Extracts the content as bytes.

Attributes

def contentAsBytes(of: Future[Result])(implicit timeout: Timeout, mat: Materializer): ByteString

Extracts the content as bytes.

Extracts the content as bytes.

Attributes

Extracts the content as bytes.

Extracts the content as bytes.

Attributes

def contentAsJson(of: Content)(implicit timeout: Timeout): JsValue

Extracts the content as Json.

Extracts the content as Json.

Attributes

def contentAsJson(of: Future[Result])(implicit timeout: Timeout, mat: Materializer): JsValue

Extracts the content as Json.

Extracts the content as Json.

Attributes

def contentAsJson(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): JsValue

Extracts the content as Json.

Extracts the content as Json.

Attributes

def contentAsString(of: Content)(implicit timeout: Timeout): String

Extracts the content as String.

Extracts the content as String.

Attributes

def contentAsString(of: Future[Result])(implicit timeout: Timeout, mat: Materializer): String

Extracts the content as String.

Extracts the content as String.

Attributes

def contentAsString(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): String

Extracts the content as String.

Extracts the content as String.

Attributes

def contentType(of: Content)(implicit timeout: Timeout): String

Extracts the Content-Type of this Content value.

Extracts the Content-Type of this Content value.

Attributes

def contentType(of: Future[Result])(implicit timeout: Timeout): Option[String]

Extracts the Content-Type of this Result value.

Extracts the Content-Type of this Result value.

Attributes

def contentType(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Option[String]

Extracts the Content-Type of this Result value.

Extracts the Content-Type of this Result value.

Attributes

def cookies(of: Future[Result])(implicit timeout: Timeout): Cookies

Gets the Cookies associated with this Result value. Note that this only extracts the "new" cookies added to this result (e.g. through withCookies), not including the Session or Flash. The final set of cookies may be different because the Play server automatically adds those cookies and merges the headers.

Gets the Cookies associated with this Result value. Note that this only extracts the "new" cookies added to this result (e.g. through withCookies), not including the Session or Flash. The final set of cookies may be different because the Play server automatically adds those cookies and merges the headers.

Attributes

def cookies(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Cookies

Extracts the Cookies set by this Result value.

Extracts the Cookies set by this Result value.

Attributes

def flash(of: Future[Result])(implicit timeout: Timeout): Flash

Extracts the Flash values set by this Result value.

Extracts the Flash values set by this Result value.

Attributes

def flash(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Flash

Extracts the Flash values set by this Result value.

Extracts the Flash values set by this Result value.

Attributes

def header(header: String, of: Future[Result])(implicit timeout: Timeout): Option[String]

Extracts an Header value of this Result value.

Extracts an Header value of this Result value.

Attributes

def header(header: String, of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Option[String]

Extracts an Header value of this Result value.

Extracts an Header value of this Result value.

Attributes

def headers(of: Future[Result])(implicit timeout: Timeout): Map[String, String]

Extracts all Headers of this Result value.

Extracts all Headers of this Result value.

Attributes

def headers(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Map[String, String]

Extracts all Headers of this Result value.

Extracts all Headers of this Result value.

Attributes

def redirectLocation(of: Future[Result])(implicit timeout: Timeout): Option[String]

Extracts the Location header of this Result value if this Result is a Redirect.

Extracts the Location header of this Result value if this Result is a Redirect.

Attributes

Extracts the Location header of this Result value if this Result is a Redirect.

Extracts the Location header of this Result value if this Result is a Redirect.

Attributes

def session(of: Future[Result])(implicit timeout: Timeout): Session

Extracts the Session values set by this Result value.

Extracts the Session values set by this Result value.

Attributes

def session(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Session

Extracts the Session set by this Result value.

Extracts the Session set by this Result value.

Attributes

def status(of: Future[Result])(implicit timeout: Timeout): Int

Extracts the Status code of this Result value.

Extracts the Status code of this Result value.

Attributes

def status(of: Accumulator[ByteString, Result])(implicit timeout: Timeout, mat: Materializer): Int

Extracts the Status code of this Result value.

Extracts the Status code of this Result value.

Attributes