How can I connect to a full web site rather than mobile web page from code? The reason why I ask this is when I try to connect a web site which has a mobile web site, it directs to mobile page so I can’t get the content of the full site.
I’m using this code to connect to site but I tried two or three different code to connect all of them didn’t work.
URL url = new URL(adress);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setDoOutput(true);
urlConnection.connect();
InputStream inputStream = urlConnection.getInputStream();
Thanks
try to set proper header properties e.g. like this: