Android URLConnection GET query works WiFi but different response 3G
- by kisplit
Hey, I have some code which queries a web server using HTTP GET
URLConnection connection = new URL("www.example.com" + "?blah=ok").openConnection();
connection.setRequestProperty("Accept-Charset", "UTF-8");
InputStream http_response = connection.getInputStream();
Now when I run this code while connected to WiFi I get the expected response but when I run this with WiFi disabled I instead seem to get the response of www.example.com without the appended query.
Does anyone know why this is happening?