title: An HTTP POST, authenticated with the key Android
body: <p>I had to do  <code>HTTP POST, authenticated with the key</code>. I had the key with me and also url.</p>
  
  <p>But am getting 400 response code i.e, bad request error.</p>
  
  <p>My code is:</p>
  
  <pre><code>Authenticator.setDefault(new Authenticator() {
                      protected PasswordAuthentication getPasswordAuthentication() {
                         return new PasswordAuthentication("sixxxxxxxx","xxxxxxxxxTGh7fYbA:xxxxxxoRtGnOIb_vno1wQ".toCharArray());
                         }
                  });
  </code></pre>
  
  <p>I found this is for username and password. But i want to authenticate with specific key only</p>
  
  <p>How to do this?</p>
  
  <p>Thanks</p>