The cresponse.Response class is currently completely opaque:
In [1]: from japronto.response.cresponse import Response
In [2]: resp = Response(code=204)
In [3]: resp.code
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-8-a60c9f6c40f4> in <module>()
----> 1 resp.code
AttributeError: 'cresponse.Response' object has no attribute 'code'
In [4]: dir(resp)
Out[4]:
['__class__',
'__delattr__',
'__dir__',
'__doc__',
'__eq__',
'__format__',
'__ge__',
'__getattribute__',
'__gt__',
'__hash__',
'__init__',
'__init_subclass__',
'__le__',
'__lt__',
'__ne__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__sizeof__',
'__str__',
'__subclasshook__']
This prevents any kind of response introspection by middleware / handler decorators. Please expose at least the fields that a Response can be initialized with.
The
cresponse.Response
class is currently completely opaque:This prevents any kind of response introspection by middleware / handler decorators. Please expose at least the fields that a Response can be initialized with.