title: Python Requests HTTP Response 406
body: <p>I have my own domain where an json file is stored (<code>http://example.com/file.json)</code>. When accesing the file in browser using the direct link, the json is returned just fine. But when using the same approach in my python code below, the http response is <strong>406</strong>. Any ideas why?</p>
  
  <pre><code>import requests
  url = 'http://example.com/file.json'
  r = requests.get(url, headers={"Accept":"text/html"})
  print(r.status_code)
  print(r.headers)
  </code></pre>
  
  <p>Prints:</p>
  
  <pre><code>406
  {'Server': 'nginx/1.14.1', 'Date': 'Sun, 12 May 2019 16:53:25 GMT', 'Content-Type': 'text/html; charset=iso-8859-1', 'Content-Length': '226', 'Connection': 'k
  eep-alive'}
  </code></pre>