title: Using password protected API in python
body: <p>I'm having trouble working with an api. I was given a password and the header (x-app-id) I was given little documentation on the api but below it is shown how to retrieve the data using curl (from documentation):</p>
  
  <pre><code>curl -X GET "https://r6db.com/api/v2/players?
  name=Bomb&amp;platform=ps4&amp;exact=true" -H "accept: application/json" -H "x-app-
  id: password"
  </code></pre>
  
  <p>Above returns information on a player named 'Bomb' on the platform 'ps4' relating to the game Rainbow six siege. exact = true means tat the name has to be exact.</p>
  
  <p>Can't give password for security reasons. Here is my try at replicating above in python going off another post I saw</p>
  
  <pre><code>import json 
  import requests
  URL = "https://r6db.com/api/v2/players?name=Bomb&amp;platform=ps4&amp;exact=true"
  KEY = "password"
  headers  = {"x-app-id": "application/json"}
  params = {
    "a-app-id": KEY
  }
  resp = requests.post(URL + "login/", headers = headers, 
  data=json.dumps(params))
  
  if resp.status_code != 200:
      print('error: ' + str(resp.status_code))
  else:
      print('Success')
  </code></pre>
  
  <p>Needless to say it doesn't work (it outputs error 404) which probably means I haven't even managed to get x-app-id as the header, any help appreciated thanks. </p>