title: send header value using HttpUrlConnection
body: <p>I have trying to send response to server using authentication value which, it provides me at login time. The server only accepts requests when that value is sent. However it works well with <a href="https://i.stack.imgur.com/twfzo.png" rel="nofollow noreferrer">postman (see snapshot)</a> but not with my code.</p>
  
  <p>code</p>
  
  <pre><code> URL url = new URL(strings[0]);
              HttpURLConnection con = (HttpURLConnection) url.openConnection();
              String token = "" + new String(accessToken);
              con.setRequestMethod("GET");
              con.setRequestProperty("AuthToken", token);
              con.setReadTimeout(15000);
              con.setConnectTimeout(15000);
              con.setDoOutput(false);
  </code></pre>
  
  <p>I also have tried in that way</p>
  
  <pre><code>String token = "AuthToken :" + new String(accessToken);
  con.setRequestProperty("Authorization", token);
  </code></pre>