B4J Question [WebApp] URL parameters when using websockets

neophyte

New Member
Licensed User
Longtime User
Is it possible to use parameters in the URL when using websockets?

With handlers, I can use a wildcard
B4X:
srvr.AddHandler("/helloworld/*", "HelloWorld", False)

but the following gives 404 not found if I do, for example, localhost:51042/helloworld/test
B4X:
srvr.AddWebSocket("/helloworld/*", "HelloWorld")
 
Last edited:

udg

Expert
Licensed User
Longtime User
Hi neophyte,

shouldn't you ask for localhost:51042/helloworld/test?
A matter of server: port instead of server://port.
 
Upvote 0

neophyte

New Member
Licensed User
Longtime User
Thanks udg,
I had it correct in my browser, just typed it wrong in my original post, which I have now corrected.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Returning to your question on post #1: have a look here.
Parameter "Path" in AddWebSocket is not explained as to support wildcards.
 
Upvote 0
Top