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