Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the HTTP method 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?

like image 842
Sam Berry Avatar asked Sep 15 '14 21:09

Sam Berry


People also ask

What is purge in HTTP?

A purge is what happens when you pick out an object from the cache and discard it along with its variants. Usually a purge is invoked through HTTP with the method PURGE . An HTTP purge is similar to an HTTP GET request, except that the method is PURGE .

What is purge request in Postman?

Postman DELETE request deletes a resource already present in the server. The DELETE method sends a request to the server for deleting the request mentioned in the endpoint. Thus it is capable of updating data on the server.

What is purge in API?

The Fast Purge API provides a programmatic interface for you to purge edge content. In this version, purge your own set of URLs or ARLs (Akamai resource locators), or any content grouped under a content provider (CP) code or cache tag.


1 Answers

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

like image 55
Remy Lebeau Avatar answered Sep 19 '22 13:09

Remy Lebeau