What is the HTTP method PURGE?

ぐ巨炮叔叔 提交于 2020-05-10 06:54:17

问题


Today when using Postman I noticed the method option of PURGE. I have never encountered it in practice and cannot find the explanation of it's purpose.

What is this method used for, where did it come from, and is there a spec for it somewhere?


回答1:


There is an HTTP PURGE method, though it is not defined in the HTTP RFCs (which do allow for custom methods beyond the standard defined methods). Some HTTP servers and caching systems actually do implement PURGE, for instance Squid and Varnish:

Squid: How can I purge an object from my cache?

Varnish: Purging and banning

And it is possible to send PURGE requests with curl, for example:

Varnish purge using HTTP and REGEX



来源:https://stackoverflow.com/questions/25857508/what-is-the-http-method-purge

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!