You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exposing vibe.web.web.getRequestContext() would allow users to extend the functionality already present in vibe.web.web. A good example would be a theoretical signIn function:
// How it would have to currently be written/usedvoidsignIn(scope HTTPServerResponse res, User user);
// What this change would allow, fitting in more closely with the declarative style of vibe.web.webvoidsignIn(User user);
I'm opening this issue before submitting a pull request for some feedback on this change.
The text was updated successfully, but these errors were encountered:
There is just one reason that (kind of) speaks against this, AFAICS, namely that the request/response handling API will probably change in the redesign of the HTTP module - the old API will stay, but will be less efficient. So adding such an API now would be based on a mechanism that is known to be a dead-end. On the other hand, of course request/response parameters are already possible, and it will usually actually help encapsulating the req/res access, so this really is not a very strong argument.
API-wise, I'd expose the request and response objects individually and keep the RequestContext struct private, as that would fit better with the existing language accessor and allows to be a bit more flexible w.r.t. to internal and external representation.
Exposing
vibe.web.web.getRequestContext()
would allow users to extend the functionality already present invibe.web.web
. A good example would be a theoreticalsignIn
function:I'm opening this issue before submitting a pull request for some feedback on this change.
The text was updated successfully, but these errors were encountered: