summaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/fail-with-body.d
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cmdline-opts/fail-with-body.d')
-rw-r--r--docs/cmdline-opts/fail-with-body.d16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/cmdline-opts/fail-with-body.d b/docs/cmdline-opts/fail-with-body.d
new file mode 100644
index 000000000..91db8bde8
--- /dev/null
+++ b/docs/cmdline-opts/fail-with-body.d
@@ -0,0 +1,16 @@
+Long: fail-with-body
+Protocols: HTTP
+Help: Fail on HTTP errors but save the body
+Category: http output
+Added: 7.76.0
+See-also: fail
+---
+
+Return an error on server errors where the HTTP response code is 400 or
+greater). 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 still allow curl to outputting and save that content but
+also to return error 22.
+
+This is an alternative option to --fail which makes curl fail for the same
+circumstances but without saving the content.