xref: /curl/docs/cmdline-opts/anyauth.md (revision e7219c2b)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: anyauth
5Help: Pick any authentication method
6Protocols: HTTP
7Category: http proxy auth
8Added: 7.10.6
9Multi: mutex
10See-also:
11  - proxy-anyauth
12  - basic
13  - digest
14Example:
15  - --anyauth --user me:pwd $URL
16---
17
18# `--anyauth`
19
20Figure out authentication method automatically, and use the most secure one
21the remote site claims to support. This is done by first doing a request and
22checking the response-headers, thus possibly inducing an extra network
23round-trip. This option is used instead of setting a specific authentication
24method, which you can do with --basic, --digest, --ntlm, and --negotiate.
25
26Using --anyauth is not recommended if you do uploads from stdin, since it may
27require data to be sent twice and then the client must be able to rewind. If
28the need should arise when uploading from stdin, the upload operation fails.
29
30Used together with --user.
31