在Python中发送ajax标头

One website API require pass as an ajax header to order to setup the connection

.$.ajaxSetup(
{
    headers:
    {
        'API-Key': "<your api key>"
    }
});

I write a Python to simulate this connection,but could only get a response 200:

import sys, socket
import requests

url= 'http://demo.datagearbox.com/api'
access_token ='543d927eecf39069b31cceee60e9d6d1'

result = requests.post(url,
      headers={'Content-Type':'application/json',
               'Authorization': 'API-Key {}'.format(access_token)})

print(result)

Can someone please tell me what I missed? Thank you

Try this:

result = requests.post(url,
      headers={
          'Content-Type':'application/json', 
          'API-Key': '{}'.format(access_token)
      }
)