Skip to content

Commit 6d63777

Browse files
committed
add support for ws:// and wss://
1 parent 7872cb6 commit 6d63777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AndroidAsync/src/com/koushikdutta/async/http/AsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ public void onConnectCompleted(Exception ex, AsyncHttpResponse response) {
635635

636636
public Future<WebSocket> websocket(String uri, String protocol, final WebSocketConnectCallback callback) {
637637
assert callback != null;
638-
final AsyncHttpGet get = new AsyncHttpGet(uri);
638+
final AsyncHttpGet get = new AsyncHttpGet(uri.replace("ws://", "http://").replace("wss://", "https://"));
639639
return websocket(get, protocol, callback);
640640
}
641641

0 commit comments

Comments
 (0)