Python 2.7请求标头

时间:2016-04-06 19:30:43

标签: python python-requests postman icws

我尝试使用requests.get发送标头:

url = 'http://qp-nachorat2000:8018/icws/' + sessionID + '/status/user-statuses/Administrator' 
header = {'ININ-ICWS-CSRF-Token': csrfToken} 
pcRequest = requests.get(url, headers=header)

这导致400响应:

{u'errorCode': 2, 
 u'message': u'A session CSRF token is needed for this request, but none was provided.', 
 u'errorId': u'error.request.accessDenied.csrfToken.missing'}

同样的GET在Postman中完美无缺:

asdfd

我错过了什么?任何帮助将不胜感激。

0 个答案:

没有答案