I try to connect to an https site from my program and I get "Failed to Connect" error message with status 0. The url of the HttpJob.Download is built with JSON sent to a WiFiServer object from the mobile phone. I copy the url from the logs and paste it to Chrome and works. I then paste it in the rHttpUtils2 example (https://www.b4x.com/android/forum/threads/module-rhttputils2-http-client.74785/#content)and works again. What might be wrong in my program (my program uses the B4X library) ?
I then create a WiFi server socket and send to the ESP8266 the connection to the WiFi details from a mobile phone.
The ESP8266 gets the details and connects to the WiFi and downloads some data from my server.
The problem is exactly the code above. If it runs it does not allow any outgoing connection and it returns
as a result Failed to Connect and status 0. When removed everything is working like a charm.
Why is this happening?
Edit - I suppose that I give to it wrong gateway because it keeps the configuration also afterwards when connected to the WiFi. Is it so?
Edit 2 - It is not so.
Thanks, I have seen this in the past and have downloaded it to get some example code. What I need though is different because I want to pass also some other variables in the JSON I send and do it directly from any phone. I 've got it to work flawlessly now.