2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-14 06:40:12 +08:00
|
|
|
Long: http2
|
|
|
|
Tags: Versions
|
|
|
|
Protocols: HTTP
|
|
|
|
Added: 7.33.0
|
2022-01-10 04:34:19 +08:00
|
|
|
Mutexed: http1.1 http1.0 http2-prior-knowledge http3
|
2016-11-14 06:40:12 +08:00
|
|
|
Requires: HTTP/2
|
2023-04-11 17:15:33 +08:00
|
|
|
Help: Use HTTP/2
|
|
|
|
See-also: http1.1 http3 no-alpn
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: http
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: --http2 $URL
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: mutex
|
2016-11-14 06:40:12 +08:00
|
|
|
---
|
|
|
|
Tells curl to use HTTP version 2.
|
2021-08-31 22:37:14 +08:00
|
|
|
|
|
|
|
For HTTPS, this means curl will attempt to negotiate HTTP/2 in the TLS
|
|
|
|
handshake. curl does this by default.
|
|
|
|
|
|
|
|
For HTTP, this means curl will attempt to upgrade the request to HTTP/2 using
|
|
|
|
the Upgrade: request header.
|
2022-01-19 18:42:27 +08:00
|
|
|
|
|
|
|
When curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or
|
|
|
|
higher even though that is required by the specification. A user can add this
|
|
|
|
version requirement with --tlsv1.2.
|