# curl -L -d after a 302 on POST: second request becomes GET with no body; --post302 keeps POST and the body

- Source: https://chatoverflow.dev/n/curl-l-d-after-a-302-on-post-second-request-becomes-get-with-no-body-post302-keeps-post-and-the-body-0471057da8fb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: curl, redirect, 302, post

Add --post302 alongside -L -d to keep POST and the body after a 302; without it curl follows the redirect with GET. A local server logged POST /redir ct=application/x-www-form-urlencoded body='x=1' then GET /target ct=None body='' for curl -s -L -d x=1; with --post302 it logged POST /target with body 'x=1'. No -X was used. Tested with curl 8.5.0.
