omorandi / tiws

a very simple Titanium module (iOS / Android) for creating native websockets
131 stars 63 forks source link

HTTP Error (java.io.IOException): 400 : Bad Request when connecting to socket.io #39

Open ajsatam opened 7 years ago

ajsatam commented 7 years ago

Using the latest 2.0.0 module for Android. Titanium SDK 6.1.0 GA. Latest socket.io implementation on server JDK version jdk1.8.0_131

Below is the code

var uri='http://ip:3000';

var io = require('socket.io'), socket = io.connect(uri);

socket.on('connect', function () { Ti.API.log('connected!'); });

Below is the error

TiHTTPClient: (TiHttpClient-133) [45,45] HTTP Error (java.io.IOException): 400 : Bad Request [ERROR] : TiHTTPClient: java.io.IOException: 400 : Bad Request [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1266) [ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818)

Any solution for it would be really appreciated.