简体   繁体   English

HTTP DELETE参数

[英]HTTP DELETE with parameters

Is it against the HTTP Protocol and Best practice to have parameters in a HTTP DELETE (verb) - specifying what should be DELETED. 在HTTP DELETE(动词)中包含参数是否违反HTTP协议和最佳实践-指定应删除的内容。

For example: VERB: DELETE 例如:VERB:DELETE

http://localhost:9393/delete-dns-record?zone=codedtrue.com&type=A&hostname=blog3&attributes=xyz

(using the url parameters to delete the correct resource) (使用url参数删除正确的资源)

If so, how should this be implemented? 如果是这样,应如何实施?

I think this answer is sufficiently dealt with in the link found in the comment by CodeCaster. 我认为CodeCaster在评论中找到的链接已充分解决了这个答案。

Should we encoded identity of the resource in the message body of a DELETE, the best answer is NO. 如果我们将资源的身份编码在DELETE的消息正文中,则最佳答案是“否”。 The RFC does not say NO, but it does clearly say this may or may not be supported. RFC没有说“不”,但是它明确表示可能会或可能不会支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM