-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpServerRoutes.ws() javadoc is not in line with WebsocketInbound capabilities #191
Comments
Hi, You are able to do the following:
So can you clarify your request? Thanks, |
Hi @violetagg, How do you get the value of Thanks, |
yes with this shortcut you will not be able to access the parameters, however you still can use |
That's my point. The javadoc claims we can do that, but we can't. So maybe worth removing this part: |
actually they are resolved as you can see in the test above and in the source here |
That would be great thanks! Maybe it works like internally that but from user point of view (reading the javadoc) I am more interested in what I can do with it instead of how it is implemented. |
HttpServerRoutes.ws()
says:Additional regex matching is available e.g. "/test/{param}". Params are resolved using HttpServerRequest.param(CharSequence)
. This is not correct (at least not this way).The
ws()
methods work withWebsocketInbound
and not withHttpServerRequest
.WebsocketInbound
does not extendHttpServerRequest
and does not have any of theparam*
methods thatHttpServerRequest
has.The implementation of
WebsocketInbound
:HttpServerWSOperations
does have these methods because it inherits them fromHttpServerOperations
(which is also the implementation ofHttpServerRequest
).So IMHO either this part should be removed from the
ws()
javadocs or theparam*
method declarations should be moved fromHttpServerRequest
to an interface which then could be extended by bothHttpServerRequest
andWebsocketInbound
.The text was updated successfully, but these errors were encountered: