Reputation: 3782
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)
Upvotes: 1
Views: 1877
Reputation: 3782
Problem solved, like @fgalan told in previous comments. A fix was made at PEP Proxy Wilma, as it can be seen here
Upvotes: 1
Reputation: 853
You should remove the content-type header as suggested by the error message.
Upvotes: 0