[ https://jira.fiware.org/browse/HELP-9553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez updated HELP-9553: --------------------------------- Description: Created question in FIWARE Q/A platform on 20-12-2016 at 16:12 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/41245352/how-to-work-with-delete-request-and-x-auth-token +Question:+ How to work with DELETE request and X-Auth-Token +Description:+ 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) was: Created question in FIWARE Q/A platform on 20-12-2016 at 16:12 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/41245352/how-to-work-with-delete-request-and-x-auth-token +Question:+ How to work with DELETE request and X-Auth-Token +Description:+ 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) HD-Enabler: Orion > FIWARE.Question.Tech.How to work with DELETE request and X-Auth-Token. > ---------------------------------------------------------------------- > > Key: HELP-9553 > URL: https://jira.fiware.org/browse/HELP-9553 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Fermín Galán > Labels: fiware, fiware-orion, fiware-wilma, http-delete, http-headers > > Created question in FIWARE Q/A platform on 20-12-2016 at 16:12 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/41245352/how-to-work-with-delete-request-and-x-auth-token > +Question:+ > How to work with DELETE request and X-Auth-Token > +Description:+ > 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) -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy