New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use of --fail hides http headers/body #1978
Comments
You're actually using and experiencing |
ok i guess that means I'm requesting a new option that behaves like this? |
What's your use case? You could use --write-out to save the http code in a variable, which is easy as long as you are redirecting the server output somewhere. If you want server output to go directly to stdout then I think you'd have to open a separate file descriptor like this. |
my use case is to capture the http body and have a non zero exit code for non 2xx status codes. thanks for the tip/link as that seems like the path I'll have to go down if I want to do this with existing curl version. |
so i guess that means i don’t get a new flag doing the more straight forward solution? |
No, I find it very hard to motivate a new flag with a functionality that is so close to the existing functionality, and when you can achieve what you want with very little extra effort on your behalf. |
ok. thanks for your reply. |
I did this
I expected the following
curl/libcurl version
[curl -V output]
operating system
The text was updated successfully, but these errors were encountered: