Hello,
I'm trying to get data from Aruba Streaming Api site using java websocket but it always returns error 401.
I set the websocket http headers the same as the python code in the example from Using Streaming API Python Client.
My Python code is running fine and getting the real streaming data from my Aruba access point.
Has anyone used java websocket to get the streaming data already or please help me.
I'm using the java websocket like this:
Map<String, String> headerMap = new HashMap<>();
headerMap.put("UserName", username);
headerMap.put("Authorization", wssKey);
headerMap.put("Topic", topic);
WebSocketHttpHeaders webSocketHeaders = new WebSocketHttpHeaders();
headerMap.forEach(webSocketHeaders::add);
stompClient.connectAsync(websocketUrl, webSocketHeaders, new ArubaStompSessionHandler(topic, username));