base
Utility functions and types.
The HTTP status codes exported here are spelled out rather than imported from the standard library http client, which is expensive to import under IronPython and is not otherwise needed to describe a request or a response.
Attributes
OK = 200
module-attribute
ACCEPTED = 202
module-attribute
NO_CONTENT = 204
module-attribute
INTERNAL_SERVER_ERROR = 500
module-attribute
DEFAULT_SOURCE = 'pyrevit.routes'
module-attribute
Classes
Request(path='/', method='GET', data=None, params=None, query_params=None)
Bases: object
Request wrapper object.
Source code in pyrevitlib/pyrevit/routes/server/base.py
Attributes
path = path
instance-attribute
method = method
instance-attribute
data = data
instance-attribute
headers
property
Request headers dict.
params
property
Request parameters.
query_params
property
Request query string parameters as a dictionary.
callback_url
property
Request callback url, if provided in payload.
Methods:
Response(status=200, data=None, headers=None)
Bases: object
Response wrapper object.
Source code in pyrevitlib/pyrevit/routes/server/base.py
Attributes
status = status
instance-attribute
data = data
instance-attribute
headers
property
Response headers dict.