2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-16 06:44:58 +08:00
|
|
|
Long: fail
|
|
|
|
Short: f
|
|
|
|
Protocols: HTTP
|
2022-04-16 05:50:34 +08:00
|
|
|
Help: Fail fast with no output on HTTP errors
|
2021-02-11 15:30:39 +08:00
|
|
|
See-also: fail-with-body
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: important http
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: --fail $URL
|
2022-07-29 03:02:45 +08:00
|
|
|
Mutexed: fail-with-body
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 4.0
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: boolean
|
2016-11-16 06:44:58 +08:00
|
|
|
---
|
2022-04-16 05:50:34 +08:00
|
|
|
Fail fast with no output at all on server errors. This is useful to enable
|
|
|
|
scripts and users to better deal with failed attempts. In normal cases when an
|
|
|
|
HTTP server fails to deliver a document, it returns an HTML document stating
|
|
|
|
so (which often also describes why and more). This flag will prevent curl from
|
|
|
|
outputting that and return error 22.
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
This method is not fail-safe and there are occasions where non-successful
|
|
|
|
response codes will slip through, especially when authentication is involved
|
|
|
|
(response codes 401 and 407).
|