Replies: 2 comments
-
Currently only the methods that are sync return the object back; the objects that take a callback in order to continue do not return the object, because you'll end up having issues if you chain off of them. You should resume interaction with response within the callback after calling those methods. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Should we add a note about this to the docs? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently some Response functions return the Response.
These include
response.send()
,response.json()
and some others.Why do those functions return Response, but others like
response.sendFile()
andresponse.render()
don't?Currently I am (ab)using the Response return of
response.send()
to make sure my routing functions always return a response and don't get stuck in some function paths.It would be very useful to me if the rest of the Response functions also return the Response.
Beta Was this translation helpful? Give feedback.
All reactions