XE5 TREstClient EIdHTTPProtocolException on 3G
My application is using TRESTClient, TRESTRequest and TRESTResponse on my App and have no problem whenever my device is on Wifi, but im getting EiDHTTPProtocolException HTTP/1.1 403 Forbidden if it's on 3G.
INTERNET is set to TRUE in uses permission.
the code is a simple call to execute
Appreciate any ideas or pointers :)
Indy (which TRESTClient uses internally) does not care how the device connects to the Internet. TCP/IP is TCP/IP regardless of the hardware involved. The fact you are getting an HTTP error proves that, since 403 Forbidden is reported by the HTTP server you are connecting to. The HTTP request being sent is either missing authorization credentials that the HTTP server needs, or is otherwise malformed in some way the HTTP server does not like. You need to use a packet sniffer to see the actual HTTP requests being sent. Indy does not send different HTTP requests for WiFi vs 3G, so something else is going on. Maybe the telco provider is changing the HTTP requests while in flight, for instance.