title: HttpConnectionUrl always return status code 307
body: <p>I am trying to hit a web service. it is working fine with android 4.4 or android 5.X. but when i am trying to hit "<code>http://inmotion-prod.cloudapp.net:145/service1.svc/json/GetCustomerUUID"</code> using android 4.1.1 it always returning me 307 status code. but this url is working fine with android 4.4 or 5.x. i also tried to hit other url it is working fine on android 4.1.1. 
  so please tell me what is the problem</p>
  
  <pre><code>Log.i(TAG, url);
          String response = null;
          HttpURLConnection conn = null;
          try {
              URL webServiceUrl = new URL(url);
              conn = (HttpURLConnection) webServiceUrl
                      .openConnection();
              Log.i(TAG, "Connection open");
              conn.setRequestMethod(GET);
              conn.setConnectTimeout(CONNECTION_TIME_OUT);
              conn.setRequestProperty(CONTENT_TYPE, contentType);
              conn.setRequestProperty(ACCEPT_TYPE, acceptType);
              conn.setDoInput(true);
              conn.connect();
              Log.i(TAG, "Connection Connected");
  
              if (conn.getResponseCode() == HttpURLConnection.HTTP_OK &amp;&amp; conn.getInputStream() != null) {
                  response = StreamUtility.convertStreamToString(conn.getInputStream());
                  conn.getInputStream().close();
              }
  
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              if (conn != null) {
                  conn.disconnect();
              }
          }
  
          return response;
      }
  </code></pre>