|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.springframework.mock.web.MockHttpServletRequest org.codehaus.groovy.grails.plugins.testing.GrailsMockHttpServletRequest
class GrailsMockHttpServletRequest extends MockHttpServletRequest
A custom mock HTTP servlet request that provides the extra properties and methods normally injected by the "servlets" plugin.
Property Summary | |
---|---|
boolean |
invalidToken
|
Method Summary | |
---|---|
java.lang.Object
|
each(groovy.lang.Closure c)
Iterates over the request attributes. |
java.lang.Object
|
find(groovy.lang.Closure c)
Adds a "find()" method to the request that searches the request's attributes. |
java.lang.Object
|
findAll(groovy.lang.Closure c)
Like the find(Closure) method, this searches the request attributes. |
java.lang.Object
|
getAt(java.lang.String key)
Map-like access to request attributes, e.g. request["count"]. |
java.lang.String
|
getForwardURI()
Implementation of the dynamic "forwardURI" property. |
java.lang.Object
|
getJSON()
Parses the request content as JSON using the JSON converter. |
java.lang.Object
|
getProperty(java.lang.String name)
Property access for request attributes. |
java.lang.Object
|
getXML()
Parses the request content as XML using XmlSlurper and returns the GPath result object. |
boolean
|
isGet()
|
boolean
|
isPost()
|
boolean
|
isXhr()
Indicates whether this is an AJAX request or not (as far as Grails is concerned). |
void
|
makeAjaxRequest()
Makes this request an AJAX request as Grails understands it. |
void
|
putAt(java.lang.String key, java.lang.Object val)
Map-like setting of request attributes, e.g. request["count"] = 10. |
void
|
setForwardURI(java.lang.String uri)
Sets the "forwardURI" property for the request. |
void
|
setProperty(java.lang.String name, java.lang.Object value)
Property setting of request attributes. |
Property Detail |
---|
boolean invalidToken
Method Detail |
---|
java.lang.Object each(groovy.lang.Closure c)
java.lang.Object find(groovy.lang.Closure c)
true
, just like the normal Groovy find() method.
java.lang.Object findAll(groovy.lang.Closure c)
java.lang.Object getAt(java.lang.String key)
java.lang.String getForwardURI()
java.lang.Object getJSON()
java.lang.Object getProperty(java.lang.String name)
java.lang.Object getXML()
boolean isGet()
boolean isPost()
boolean isXhr()
true
if it is an
AJAX request, otherwise false
.
void makeAjaxRequest()
void putAt(java.lang.String key, java.lang.Object val)
void setForwardURI(java.lang.String uri)
void setProperty(java.lang.String name, java.lang.Object value)
Groovy Documentation