Open idchlife opened 9 years ago
+1, I just used "https://" instead.
Hi, I have same issue. This is my request format AsyncHttpRequest req = new AsyncHttpRequest(Uri.parse("ws://myapp-publisher.test.com:9000/content?Id=10142&startTime=1435687200&endTime=1435687500), null);
Could you please help?
AsyncHttpGet get = new AsyncHttpGet("http://example.com:8800/");
AsyncHttpClient.getDefaultInstance().websocket(get, null, new AsyncHttpClient.WebSocketConnectCallback() {
@Override
public void onCompleted(Exception ex, WebSocket webSocket) {
if (ex != null) {
ex.printStackTrace();
return;
}
webSocket.send("a string");
webSocket.setStringCallback(new StringCallback() {
public void onStringAvailable(String s) {
System.out.println("I got a string: " + s);
}
});
}
});
Use AsyncHttpGet() and use in uri http:// protocol, not ws://
I'm trying to parse uri like this:
... etc
And this is what I always get in logcat.
Maybe somebody encountered similar error? How to parse uri like "ws://uri.com:8888"?