curl/docs/cmdline-opts/fail-with-body.d
Daniel Stenberg 68784d73c3
curl.1: provide examples for each option
The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654
2021-09-01 14:02:43 +02:00

17 lines
611 B
Makefile

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
Example: --fail-with-body $URL
---
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 output 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.