Sending HTTP DELETE request in Android

后端 未结 9 1609
悲哀的现实
悲哀的现实 2020-12-15 04:02

My client\'s API specifies that to remove an object, a DELETE request must be sent, containing Json header data describing the content. Effectively it\'s the same call as ad

9条回答
  •  轮回少年
    2020-12-15 04:31

    To add closure to this question, it transpired that there is no supported method to send an HTTP DELETE request containing header data.

    The solution was for the client to alter their API to accept a standard GET request which indicated that the action should be a delete, containing the id of the item to be deleted.

    http://clienturl.net/api/delete/id12345
    

提交回复
热议问题