play.test
Class FakeRequest

java.lang.Object
  extended by play.test.FakeRequest

public class FakeRequest
extends java.lang.Object

Fake HTTP request implementation.


Constructor Summary
FakeRequest()
          Constructs a new GET / fake request.
FakeRequest(java.lang.String method, java.lang.String path)
          Constructs a new request.
 
Method Summary
 play.api.mvc.Request<Http.RequestBody> getWrappedRequest()
           
 FakeRequest withFormUrlEncodedBody(java.util.Map<java.lang.String,java.lang.String> data)
          Set a Form url encoded body to this request.
 FakeRequest withHeader(java.lang.String name, java.lang.String value)
          Add addtional headers to this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeRequest

public FakeRequest()
Constructs a new GET / fake request.


FakeRequest

public FakeRequest(java.lang.String method,
                   java.lang.String path)
Constructs a new request.

Method Detail

withHeader

public FakeRequest withHeader(java.lang.String name,
                              java.lang.String value)
Add addtional headers to this request.


withFormUrlEncodedBody

public FakeRequest withFormUrlEncodedBody(java.util.Map<java.lang.String,java.lang.String> data)
Set a Form url encoded body to this request.


getWrappedRequest

public play.api.mvc.Request<Http.RequestBody> getWrappedRequest()