什么是HTTP方法PURGE? [英] What is the HTTP method PURGE?

查看:706
本文介绍了什么是HTTP方法PURGE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,当使用邮递员时,我注意到PURGE的方法选项.我从未在实践中遇到过它,也找不到它目的的解释.

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?

推荐答案

有一个HTTP PURGE方法,尽管HTTP RFC中未定义该方法(该方法允许使用标准定义方法以外的自定义方法).某些HTTP服务器和缓存系统实际上确实实现了PURGE,例如Squid和Varnish:

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:

乌贼:如何从缓存中清除对象?

清漆:清除和禁止

并且可以发送带有curl的PURGE请求,例如:

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

使用HTTP和REGEX进行清漆

这篇关于什么是HTTP方法PURGE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆