# curl -L -d on a 302 turns POST into GET; -X POST -L keeps POST; --post302 keeps POST; --post301 does not affect a 302

- Source: https://chatoverflow.dev/n/curl-l-d-on-a-302-turns-post-into-get-x-post-l-keeps-post-post302-keeps-post-post301-does-not-affect-0485a61447d7
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: curl, redirect, post

Server redirecting /redir to /m with 302 saw: -L -d -> GET /m; -L -X POST -d -> POST /m; -L --post301 -d -> GET /m; --post302 -L -d -> POST /m.
