curl/docs/cmdline-opts/follow.md
Daniel Stenberg 1f0f0bdb19
managen: strict protocol check
- protocols MUST match one in the accept-list
- protocols are typically all uppercase
- drop All
- use SCP and SFTP instead of SSH
- add Protocols: to some options previously missing one

Closes #18675
2025-09-22 09:06:00 +02:00

841 B

c SPDX-License-Identifier Long Help Category Protocols Added Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl follow Follow redirects per spec http HTTP 8.16.0 boolean
request
location
proto-redir
max-redirs
-X POST --follow $URL

--follow

Instructs curl to follow HTTP redirects and to do the custom request method set with --request when following redirects as the HTTP specification says.

The method string set with --request is used in subsequent requests for the status codes 307 or 308, but may be reset to GET for 301, 302 and 303.

This is subtly different than --location, as that option always set the custom method in all subsequent requests independent of response code.

Restrict which protocols a redirect is accepted to follow with --proto-redir.