Hi
In my application i need to make few calls to server.As the app is a hybrid app i am using Rho Network API Java script Usage in order to make the POST request.
Below is the code
var loginProps = {
url : "https://test.server.com",
headers : {
"Content-Type" : "application/json",
},
body : {"user" : "sid"}
}
console.log(loginProps);
var response = Rho.Network.post(loginProps);
console.log(response['body']);
Strangely the connection to the server itself is not being made as i get the Error_code = 1 and http request failed with code 12029.
Below are the logs :
E 12/31/2014 07:17:41:282 000013f0 Net| Call HttpSendRequest failed. Url:https://test.server.com.
With code : 12029.Message: A connection with the server could not be established
I am not able to understand what might be the reason for this ??
Is there any proxy settings i have to set??
Looking forward to a solution
Thanks
Siddhant
1 Replies
Can you access your server from a web browser on your device?
Unrelated to your problem, but I certainly would not use a synchronous Network request, especially in Javascript! The browser will be frozen until a response if received, and no user interaction is possible. Always use asynchronous Network calls.
And I would encourage you to use Ruby for Network.