Package grassyknoll :: Package frontend :: Module EasyRest :: Class RestRequest
[hide private]

Class RestRequest

source code


a HTTP Request object for writing RESTful web apps.

Instance Methods [hide private]
 
__init__(self, environ, application, endpoint, **kwargs) source code
 
content_type(self)
the Content-Type, if method is POST/PUT
source code
string
load_format(self)
Returns: a reasonable load format
source code
string
dump_format(self)
Returns: a reasonable dump format
source code
 
load(self)
load plain python out of the request
source code
Response
dump(self, obj) source code
Instance Variables [hide private]
RestApplication application
The application this request is running under
string endpoint
the name of the current UrlMap endpoint
Method Details [hide private]

content_type(self)

source code 
the Content-Type, if method is POST/PUT
Decorators:
  • @werkzeug.wrappers.cached_property

load_format(self)

source code 
Returns: string
a reasonable load format
Decorators:
  • @werkzeug.wrappers.cached_property

dump_format(self)

source code 
Returns: string
a reasonable dump format
Decorators:
  • @werkzeug.wrappers.cached_property

dump(self, obj)

source code 
Parameters:
  • request (Request) - the current request
  • obj (object) - an object to dump
Returns: Response