2
0

fail.d 827 B

12345678910111213141516171819202122
  1. c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. SPDX-License-Identifier: curl
  3. Long: fail
  4. Short: f
  5. Protocols: HTTP
  6. Help: Fail fast with no output on HTTP errors
  7. See-also: fail-with-body fail-early
  8. Category: important http
  9. Example: --fail $URL
  10. Mutexed: fail-with-body
  11. Added: 4.0
  12. Multi: boolean
  13. ---
  14. Fail fast with no output at all on server errors. This is useful to enable
  15. scripts and users to better deal with failed attempts. In normal cases when an
  16. HTTP server fails to deliver a document, it returns an HTML document stating
  17. so (which often also describes why and more). This flag prevents curl from
  18. outputting that and return error 22.
  19. This method is not fail-safe and there are occasions where non-successful
  20. response codes slip through, especially when authentication is involved
  21. (response codes 401 and 407).