Class/Object

play.api.test

FakeRequest

Related Docs: object FakeRequest | package test

Permalink

case class FakeRequest[A](method: String, uri: String, headers: Headers, body: A, remoteAddress: String = "127.0.0.1", version: String = "HTTP/1.1", id: Long = 666, tags: Map[String, String] = Map.empty[String, String], secure: Boolean = false, clientCertificateChain: Option[Seq[X509Certificate]] = None) extends Request[A] with Product with Serializable

Fake HTTP request implementation.

A

The body type.

method

The request HTTP method.

uri

The request uri.

headers

The request HTTP headers.

body

The request body.

remoteAddress

The client IP.

Linear Supertypes
Serializable, Serializable, Product, Equals, Request[A], RequestHeader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FakeRequest
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Request
  7. RequestHeader
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FakeRequest(method: String, uri: String, headers: Headers, body: A, remoteAddress: String = "127.0.0.1", version: String = "HTTP/1.1", id: Long = 666, tags: Map[String, String] = Map.empty[String, String], secure: Boolean = false, clientCertificateChain: Option[Seq[X509Certificate]] = None)

    Permalink

    method

    The request HTTP method.

    uri

    The request uri.

    headers

    The request HTTP headers.

    body

    The request body.

    remoteAddress

    The client IP.

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. lazy val acceptLanguages: Seq[Lang]

    Permalink
    Definition Classes
    RequestHeader
  5. lazy val acceptedTypes: Seq[MediaRange]

    Permalink
    Definition Classes
    RequestHeader
  6. def accepts(mimeType: String): Boolean

    Permalink
    Definition Classes
    RequestHeader
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val body: A

    Permalink

    The request body.

    The request body.

    Definition Classes
    FakeRequest → Request
  9. def certs: Future[IndexedSeq[Nothing]]

    Permalink
  10. lazy val charset: Option[String]

    Permalink
    Definition Classes
    RequestHeader
  11. val clientCertificateChain: Option[Seq[X509Certificate]]

    Permalink
    Definition Classes
    FakeRequest → RequestHeader
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. lazy val contentType: Option[String]

    Permalink
    Definition Classes
    RequestHeader
  14. lazy val cookies: Cookies

    Permalink
    Definition Classes
    RequestHeader
  15. def copy(id: Long, tags: Map[String, String], uri: String, path: String, method: String, version: String, queryString: Map[String, Seq[String]], headers: Headers, remoteAddress: ⇒ String, secure: ⇒ Boolean, clientCertificateChain: Option[Seq[X509Certificate]]): RequestHeader

    Permalink
    Definition Classes
    RequestHeader
  16. def copyFakeRequest[B](id: Long = this.id, tags: Map[String, String] = this.tags, uri: String = this.uri, path: String = this.path, method: String = this.method, version: String = this.version, headers: Headers = this.headers, remoteAddress: String = this.remoteAddress, secure: Boolean = this.secure, clientCertificateChain: Option[Seq[X509Certificate]] = this.clientCertificateChain, body: B = this.body): FakeRequest[B]

    Permalink
  17. lazy val domain: String

    Permalink
    Definition Classes
    RequestHeader
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. lazy val flash: Flash

    Permalink
    Definition Classes
    RequestHeader
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getMethod: String

    Permalink

    Returns the current method

  23. def getQueryString(key: String): Option[String]

    Permalink
    Definition Classes
    RequestHeader
  24. val headers: Headers

    Permalink

    The request HTTP headers.

    The request HTTP headers.

    Definition Classes
    FakeRequest → RequestHeader
  25. lazy val host: String

    Permalink
    Definition Classes
    RequestHeader
  26. val id: Long

    Permalink
    Definition Classes
    FakeRequest → RequestHeader
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def map[B](f: (A) ⇒ B): Request[B]

    Permalink
    Definition Classes
    Request
  29. lazy val mediaType: Option[MediaType]

    Permalink
    Definition Classes
    RequestHeader
  30. val method: String

    Permalink

    The request HTTP method.

    The request HTTP method.

    Definition Classes
    FakeRequest → RequestHeader
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. lazy val path: String

    Permalink

    The request path.

    The request path.

    Definition Classes
    FakeRequest → RequestHeader
  35. lazy val queryString: Map[String, Seq[String]]

    Permalink

    The request query String

    The request query String

    Definition Classes
    FakeRequest → RequestHeader
  36. lazy val rawQueryString: String

    Permalink
    Definition Classes
    RequestHeader
  37. val remoteAddress: String

    Permalink

    The client IP.

    The client IP.

    Definition Classes
    FakeRequest → RequestHeader
  38. val secure: Boolean

    Permalink
    Definition Classes
    FakeRequest → RequestHeader
  39. lazy val session: Session

    Permalink
    Definition Classes
    RequestHeader
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. val tags: Map[String, String]

    Permalink
    Definition Classes
    FakeRequest → RequestHeader
  42. def toString(): String

    Permalink
    Definition Classes
    RequestHeader → AnyRef → Any
  43. val uri: String

    Permalink

    The request uri.

    The request uri.

    Definition Classes
    FakeRequest → RequestHeader
  44. val version: String

    Permalink
    Definition Classes
    FakeRequest → RequestHeader
  45. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def withBody[B](body: B): FakeRequest[B]

    Permalink

    Adds a body to the request.

  49. def withCookies(cookies: Cookie*): FakeRequest[A]

    Permalink

    Constructs a new request with additional Cookies.

  50. def withFlash(data: (String, String)*): FakeRequest[A]

    Permalink

    Constructs a new request with additional Flash.

  51. def withFormUrlEncodedBody(data: (String, String)*): FakeRequest[AnyContentAsFormUrlEncoded]

    Permalink

    Set a Form url encoded body to this request.

  52. def withHeaders(newHeaders: (String, String)*): FakeRequest[A]

    Permalink

    Constructs a new request with additional headers.

    Constructs a new request with additional headers. Any existing headers of the same name will be replaced.

  53. def withJsonBody(json: JsValue): FakeRequest[AnyContentAsJson]

    Permalink

    Adds a JSON body to the request.

  54. def withMultipartFormDataBody(form: MultipartFormData[TemporaryFile]): FakeRequest[AnyContentAsMultipartFormData]

    Permalink

    Adds a multipart form data body to the request

  55. def withRawBody(bytes: ByteString): FakeRequest[AnyContentAsRaw]

    Permalink

    Adds a raw body to the request

  56. def withSession(newSessions: (String, String)*): FakeRequest[A]

    Permalink

    Constructs a new request with additional session.

  57. def withTag(tagName: String, tagValue: String): RequestHeader

    Permalink
    Definition Classes
    RequestHeader
  58. def withTextBody(text: String): FakeRequest[AnyContentAsText]

    Permalink

    Adds a text body to the request.

  59. def withXmlBody(xml: NodeSeq): FakeRequest[AnyContentAsXml]

    Permalink

    Adds an XML body to the request.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Request[A]

Inherited from RequestHeader

Inherited from AnyRef

Inherited from Any

Ungrouped