mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 08:14:57 -05:00
Explain how I justified to myself making JsonResource not always send JSON.
This commit is contained in:
parent
e9c908ebc0
commit
c5bf0343e8
@ -79,6 +79,13 @@ class JsonResource(HttpServer, resource.Resource):
|
||||
Resources.
|
||||
|
||||
Register callbacks via register_path()
|
||||
|
||||
Callbacks can return a tuple of status code and a dict in which case the
|
||||
the dict will automatically be sent to the client as a JSON object.
|
||||
|
||||
The JsonResource is primarily intended for returning JSON, but callbacks
|
||||
may send something other than JSON, they may do so by using the methods
|
||||
on the request object and instead returning None.
|
||||
"""
|
||||
|
||||
isLeaf = True
|
||||
|
Loading…
Reference in New Issue
Block a user