def request():
#encoded_xml = urllib.urlencode({'XML': read_xml()})
#encoded_xml = read_xml()
headers = {'Authorization': AUTH_TOKEN,\
'developerToken': DEVELOPER_TOKEN,\
'clientCostumerID': CLIENT_ID}
content = {'__rdxml': encoded_xml}
#content = encoded_xml
#content = {'__rdxml': read_xml2()}
r = requests.post(URL, data=content,\
headers=headers)
return r
这些组合似乎不起作用。
由于某种原因未设置标题。