Re: curl follow location method
Daniel Stenberg via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 10 Jul 2023, jicea via curl-users wrote:
> For status code 301, 302 or 303, curl should switch to GET if I send a POST
> request with a "Location" header. I want to test it with a simple Flask
> endpoint, and I got this :
Let me first mention two blog posts of mine on related topics:
HTTP Redirects =>
https://daniel.haxx.se/blog/2016/02/18/http-redirects/
Unnecessary use of curl -X =>
https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/
> $ curl --verbose --request POST --location 'http://localhost:8000/follow-redirect'
Now you can read that second blog post and ponder about your use of "--request
POST" in this command line! ;-)
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html