title: Asynctask return null in SDK 23 and below device
body: <p>I'm using Asynctask to pass the parameters of API. The Asynctask executing but the String Response in Asynctask PostExecute giving me a null for a device with SDK 23 and below. But when the device is equal or higher to SDK24(Nougat), it works perfectly and the data are being sent to the API however when the SDK is 23 and lower data are not being sent to API. Does anyone encounter this problem? Please enlighten me what I miss in my code or I do wrong code. Massive thank you.</p>
  
  <pre><code> private class sendToServerOfficial extends AsyncTask&lt;String,Void,String&gt; {
  
      int statusCodeone;
  
      String convert_txt_et_username = et_username.getText().toString();
      String convert_txt_content = et_content.getText().toString();
  
      @Override
       protected String doInBackground(String... strings) {
          try {
              urlURL = new URL("http://www.testingsite.com/api/sendServer?/ip="+getIPAddress+"&amp;phone_num="+getMobilePhoneNumber+"&amp;user_text="+convert_txt_et_username+"&amp;content_text="+convert_txt_content);
              HttpURLConnection httpURLConnection = (HttpURLConnection) urlURL.openConnection();
              httpURLConnection.setRequestMethod("POST");
              httpURLConnection.setRequestProperty("Content-Type","UTF-8");
              httpURLConnection.connect();
              statusCodeone = httpURLConnection.getResponseCode();
              if (statusCodeone == 200) {
                  InputStream it = new BufferedInputStream(httpURLConnection.getInputStream());
                  InputStreamReader read = new InputStreamReader(it);
                  BufferedReader buff = new BufferedReader(read);
                  StringBuilder dta = new StringBuilder();
                  String chunks;
  
                  while ((chunks = buff.readLine()) != null) {
                      dta.append(chunks);
                  }
  
                  buff.close();
                  read.close();
                  return dta.toString();
              }
  
          }
          catch (ProtocolException e) { e.printStackTrace(); }
          catch (MalformedURLException e) { e.printStackTrace(); }
          catch (IOException e) { e.printStackTrace(); }
  
          return null;
      }
      @Override
      protected void onPostExecute(String response) {
          Toast.makeText(MainActivity.this, response + "Form is submitted already" + urlURL, Toast.LENGTH_LONG).show();
  
          txt_inputURL.setEnabled(true);
          btnClick.setClickable(true);
  
          txt_inputURL.getText().clear();
      }
  }
  </code></pre>