Class JythonRequest


  • public class JythonRequest
    extends java.lang.Object
    Request object of this class is always available as request inside Jython scripts which implement REST endpoints in XL extensions.
    • Constructor Summary

      Constructors 
      Constructor Description
      JythonRequest​(java.lang.Object entity, org.python.core.PyDictionary query)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JythonRequest

        public JythonRequest​(java.lang.Object entity,
                             org.python.core.PyDictionary query)
    • Method Detail

      • getEntity

        public java.lang.Object getEntity()
        Returns a deserialized entity in case of 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.
      • getQuery

        public org.python.core.PyDictionary getQuery()
        Returns a dictionary of query parameters of the request. Example: If the URL of the request was /api/extension/test?count=2 then parameter value will be accessible as request.query['count'].