title: Android http request not working with WiFi but working on mobile data
body: <p>I'm having trouble getting a response from a http request when the phone is connected via WiFi. When it's using mobile data everything works fine. Here is the code:</p>
  
  <pre><code>doc = Jsoup.connect("https://www.facebook.com/")
        .userAgent("Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6")
        .referrer("http://www.google.com")
        .get(); 
  </code></pre>
  
  <p>I get java.net.SocketTimeoutException:Read timed out exception. I have added these permissions in my manifest file:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  </code></pre>
  
  <p>Why is it working on mobile data and not on WiFi? (The phone has working internet access through WiFi). Thank you!</p>