I make a cURL HTTP GET request which gets a redirect response containing body. With verbose cURL output I can see in the output:
- Ignoring the response-body
I would like to see the response body even if a response is a redirect (let's say it's 301).
Is it possible to make cURL behave the way I want? Reading through cURL man hasn't helped me to find an answer. Maybe I missed something in the man.
CodePudding user response:
No, curl does not show the response body when it follows a redirect and it does not have any option to do so. It then only shows the final response body, the one that is not redirected.
You can disable the redirect following and then you will see the response body.