Follow a PATCH/DELETE redirect response with GET method

Matthew Radford via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <oGMUEAe1wVxY2axukck3e9tbBQyzAYb7hKkkW65tR17y7O3X3fQMrK2-qQ_c8TVr3IAS3nrS243X2SK4tzoiU_QgCAHkD5NdOjAu9oVf8Zo=@protonmail.com>
curl 7.87.1-DEV (x86_64-pc-linux-gnu) libcurl/7.87.1-DEV OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9
Release-Date: [unreleased]
OS: Ubuntu 22.04

There doesn't appear to be command line options to imply/coerce PATCH/DELETE methods, like you can for GET/HEAD/POST/PUT:

```
Option              | Implies Method
--------------------|----------------------
default, --get      | GET
--head              | HEAD
--data              | POST
--form              | POST
--upload-file       | PUT
?                   | PATCH
?                   | DELETE
```

The reason I ask is that I'd like to follow a 302/303 redirect response Location with a GET request after PATCH/DELETE, but using `--request|-X PATCH|DELETE` forces PATCH/DELETE on the redirect. I can expand on details with my particular use case and why following redirects with GET from PATCH/DELETE is desirable, if that's helpful.

Is it possible for curl to make a PATCH/DELETE HTTP request and follow a 302/303 redirect response Location using GET? If not, would new command line option(s) to imply/coerce the method be acceptable?

Thanks,
Matt
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.