1

I want DELETE operation be allowed only after authentication/authorization process. I tried to do a DELETE operation passing an X-Auth-Token, but I got this: The status of this operation is: 400 Some error occurred! {"error":"BadRequest","description":"Orion accepts no payload for GET/DELETE requests. HTTP header Content-Type is thus forbidden"}

I did this with GET request, without problem, but it is not working for DELETE.

headers = {'X-Auth-Token': token}
s = Session()  
request = Request('DELETE', DELETE_URL + entity_id, headers=headers)
prepped = request.prepare()
del prepped.headers['Content-Length']
r = s.send(prepped)
4

2 回答 2

1

问题解决了,就像@fgalan 在之前的评论中所说的那样。在 PEP Proxy Wilma 处进行了修复,可以在这里看到

于 2017-01-14T01:17:12.063 回答
0

您应该按照错误消息的建议删除内容类型标头。

于 2016-12-21T08:01:52.270 回答