xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: http2 |
| 4 | Tags: Versions |
| 5 | Protocols: HTTP |
| 6 | Added: 7.33.0 |
| 7 | Mutexed: http1.1 http1.0 http2-prior-knowledge http3 |
| 8 | Requires: HTTP/2 |
| 9 | See-also: no-alpn |
| 10 | Help: Use HTTP 2 |
| 11 | See-also: http1.1 http3 |
| 12 | Category: http |
| 13 | Example: --http2 $URL |
| 14 | Multi: mutex |
| 15 | --- |
| 16 | Tells curl to use HTTP version 2. |
| 17 | |
| 18 | For HTTPS, this means curl will attempt to negotiate HTTP/2 in the TLS |
| 19 | handshake. curl does this by default. |
| 20 | |
| 21 | For HTTP, this means curl will attempt to upgrade the request to HTTP/2 using |
| 22 | the Upgrade: request header. |
| 23 | |
| 24 | When curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or |
| 25 | higher even though that is required by the specification. A user can add this |
| 26 | version requirement with --tlsv1.2. |