title: Convert curl command to http request in python
body: <p>I'm new on REST API's and I'm unable to make run an http request.</p>
  
  <p>If I try the curl command it works by terminal:</p>
  
  <pre><code>curl \
   --request POST \
   --header "X-OpenAM-Username: user" \
   --header "X-OpenAM-Password: password" \
   --header "Content-Type: application/json" \
   --data "{}" \
   http://openam.sp.com:8095/openamSP/json/authenticate
  </code></pre>
  
  <p>and the result:</p>
  
  <pre><code>{"tokenId":"AQIC5wM2LY4Sfczw67Mo6Mkzq-srfED3YO8GCSe0Be6wtPs.*AAJTSQACMDEAAlNLABM2NzQ5NjQ4Mjc0MDY0MzEwMDEyAAJTMQAA*","successUrl":"/openamSP/console"}
  </code></pre>
  
  <p>But now, from my web on Django I want to make a request and I'm unable to make it work, the code that I use it's:</p>
  
  <pre><code>import requests
  headers = {'X-OpenAM-Username':'user', 'X-OpenAM-Password':'password', 'Content-Type':'application/json'}
  data = {}
  r = requests.get('http://openam.sp.com:8095/openamSP/json/authenticate', headers=headers, params=data)
  </code></pre>
  
  <p>and if I check the answer:</p>
  
  <pre><code>u'{"code":405,"reason":"Method Not Allowed","message":"Method Not Allowed"}'
  </code></pre>
  
  <p>What I'm doing wrong? I can't see where is my mistake.</p>
  
  <p>Thanks and regards.</p>