title: Android HttpsConnection - Internal Server Error
body: <p>I would like to get data from webservices of my school. I write down code in Eclipse:</p>
  
  <pre><code>List&lt;Predmet&gt; getInfo(String osobniCislo) throws IOException
      {
          String target = "https://stag-ws.zcu.cz/ws/services/rest/rozvrhy/getRozvrhByStudent?osCislo="
                  + "A12B0141P"
                  + "&amp;outputFormatEncoding=windows-1250";
  
          URL url = new URL(target);
  
          HttpsURLConnection https = (HttpsURLConnection)url.openConnection();
          https.setConnectTimeout(5000); // 5s timeout
          https.setRequestMethod("GET");
          https.setInstanceFollowRedirects(true);
          https.setUseCaches(false);
          https.setDoOutput(true);
          https.connect();
  
  
          //Response cod
          int responseCode = https.getResponseCode();
  
          System.out.println(https.getResponseMessage());
  
      }
  </code></pre>
  
  <p>This code works fine in Eclipse and I get what I want. But when I copied it into Android Studio, I'm getting <code>500 - Server Internal Error</code>. I have privilige in manifest:</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>and others websites works fine. Do someone have idea where could be a problem?</p>