public class JythonRequest
extends java.lang.Object
request
inside Jython scripts which implement REST endpoints in XL extensions.Constructor and Description |
---|
JythonRequest(java.lang.Object entity,
org.python.core.PyDictionary query) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getEntity()
Returns a deserialized entity in case of
POST, PUT request. |
org.python.core.PyDictionary |
getQuery()
Returns a dictionary of query parameters of the request.
|
public JythonRequest(java.lang.Object entity, org.python.core.PyDictionary query)
public java.lang.Object getEntity()
POST, PUT
request. Will return null
for GET, DELETE
.
If body of the request contained field someField
, it will be accessible as request.entity['someField']
in the script.public org.python.core.PyDictionary getQuery()
/api/extension/test?count=2
then parameter value will be accessible as request.query['count']
.