xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: post302 |
| 4 | Help: Do not switch to GET after following a 302 |
| 5 | Protocols: HTTP |
| 6 | See-also: post301 post303 location |
| 7 | Added: 7.19.1 |
| 8 | Category: http post |
| 9 | Example: --post302 --location -d "data" $URL |
| 10 | Multi: boolean |
| 11 | --- |
| 12 | Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET |
| 13 | requests when following a 302 redirection. The non-RFC behavior is ubiquitous |
| 14 | in web browsers, so curl does the conversion by default to maintain |
| 15 | consistency. However, a server may require a POST to remain a POST after such |
| 16 | a redirection. This option is meaningful only when using --location. |