Closed ppanero closed 4 years ago
@ppanero is this still applicable? or can we close it?
Nope :) We actually have an unused update
function in the resource_requestctx... Im not sure if it is worth removing since it could actually be useful. In any case... closing.
The selection of loader and response handler is done in the content negotiation and it is stored in the
resource_requestctx
. Then this object isupdate
d based on the result of a call to a function from its attributes... Sounds a bit wrong. Propsal:Option 1:
Move the
_response_handlers
and_request_loader
to theBaseView
since all views seem to have it.Create a function or decorator similar to the following. It would be called at the beginning of each method (get, post, etc.)
Option 2:
Create 2 decorators:
Since not every function requires both loader and handler, only those that require would call them.