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
curl -f verbose feature request #687
Comments
-f implies you don't care about the body. If you still want the body. a work-around can be made with -w instead. I'll be willing to discuss details on the curl-users mailing list, feature requests aren't really suitable in an issue tracker. |
Ok, I know how curl -f acts, and I know how curl -w acts as well. But boths cases ars not good, easy to use for me. I need behavior like with curl -f , meaning correct exit code and in case I handle this - immediate break of my script. But I still need a body. Many modern rest API, web applicatios return vital information via body when return none successful http code. curl -s -o /dev/null -w "%{http_code}\n" is possible workaround but it still requires additional bash code to verify http status which is neither convenient nor good code style , I try to avoid such bashisms which eventually make code hard to maintain. Ok, let's consider this like future request , I need a curl -f behavior plus http body at output, you don't have to change current inplimentation, we may talk about additional flag , something like --with-body or whatever proper for you. Is this a big deal ? Most part of job is done, I mean curl -f implementation already here , some extra prices is left, but thus would make curl more helpful 😄 |
Let me know where I could repost it to suggestion, curl user mail list ? |
Yup, subscribe here. |
Hi!
I need to see http body when htp request fails.
curl -f
does it job fine providing http status validation, but it suppress http body.If any way to improve this somehow?
And yes, I need an actual exit code as curl -f does.
Thanks in advance
Alexey
The text was updated successfully, but these errors were encountered: