spring websocket - Can I add request parameter to SockJs constructor so that it can be send to server -


i initialize sockjs url as

var protocols = ['xhr-polling', 'xdr-polling',  'xdr-streaming', 'xhr-streaming']; var options = {protocols_whitelist: protocols, debug: true,server:tets}; _ws = new sockjs(url, null, options); 

i want send out request parameter , example somesite/sockjs/info?someparam=tets"

is possible? documentation of sockjs refers options map can have key value not sure key use here.

i verified url @ server sockjs sends on ,

http://http_backend/cecobrowsega-3.0.0.0.31/sockjs/testapp/620/4ydem52f/xhr?null  

so in absence of request param appending null, seems there way send on request param!

it's available in latest sock js client. discussion here https://github.com/sockjs/sockjs-client/issues/72

we can pass query string along connection url, same syntax http call


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -