Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 4
    Agreed, not being able to see the error output is a painful limitation of the otherwise very handy --fail. How can you diagnose a REST api failure without seeing the error output? It's so unfortunate that the curl maintainer bagder stubbornly insists on not providing a --fail-but-show-error. github.com/curl/curl/issues/1978
    – jamshid
    Commented May 13, 2018 at 23:33
  • As stated in documentation, it doesn't work for 401 and 407 HTTP code :(
    – Logan Mzz
    Commented Aug 29, 2019 at 8:47
  • 2
    Thanks to a colleague, I discovered --fail --show-error Commented Apr 28, 2020 at 13:11
  • 1
    As of 2021 you can now use the --fail-with-body option
    – MichaelM
    Commented Oct 9, 2023 at 16:18