fail.d 823 B

123456789101112131415161718192021
  1. c: Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, 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. ---
  13. Fail fast with no output at all on server errors. This is useful to enable
  14. scripts and users to better deal with failed attempts. In normal cases when an
  15. HTTP server fails to deliver a document, it returns an HTML document stating
  16. so (which often also describes why and more). This flag will prevent curl from
  17. outputting that and return error 22.
  18. This method is not fail-safe and there are occasions where non-successful
  19. response codes will slip through, especially when authentication is involved
  20. (response codes 401 and 407).