Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exposing vibe.web.web.getRequestContext() #1937
// How it would have to currently be written/used void signIn(scope HTTPServerResponse res, User user); // What this change would allow, fitting in more closely with the declarative style of vibe.web.web void signIn(User user);
I'm opening this issue before submitting a pull request for some feedback on this change.
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