fail.d 838 B

12345678910111213141516171819202122
  1. c: Copyright (C) 1998 - 2022, 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
  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 will prevent 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 will slip through, especially when authentication is involved
  21. (response codes 401 and 407).