public class FakeRequest
extends java.lang.Object
Constructor and Description |
---|
FakeRequest()
Constructs a new GET / fake request.
|
FakeRequest(java.lang.String method,
java.lang.String path)
Constructs a new request.
|
Modifier and Type | Method and Description |
---|---|
|
getWrappedRequest() |
FakeRequest |
withCookies(Http.Cookie... cookies)
Add cookies to this request
|
FakeRequest |
withFlash(java.lang.String name,
java.lang.String value)
Add addtional session to this request.
|
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 additional headers to this request.
|
FakeRequest |
withJsonBody(org.codehaus.jackson.JsonNode node)
Set a Json Body to this request.
|
FakeRequest |
withJsonBody(org.codehaus.jackson.JsonNode node,
java.lang.String method)
Set a Json Body to this request.
|
FakeRequest |
withSession(java.lang.String name,
java.lang.String value)
Add addtional session to this request.
|
public FakeRequest()
public FakeRequest(java.lang.String method, java.lang.String path)
public FakeRequest withHeader(java.lang.String name, java.lang.String value)
public FakeRequest withJsonBody(org.codehaus.jackson.JsonNode node)
node
- the Json Nodepublic FakeRequest withJsonBody(org.codehaus.jackson.JsonNode node, java.lang.String method)
node
- the Json Nodemethod
- the HTTP method. POST if set to null
public FakeRequest withFlash(java.lang.String name, java.lang.String value)
public FakeRequest withSession(java.lang.String name, java.lang.String value)
public FakeRequest withCookies(Http.Cookie... cookies)
public FakeRequest withFormUrlEncodedBody(java.util.Map<java.lang.String,java.lang.String> data)
publicgetWrappedRequest()