xref: /aosp_15_r20/external/curl/docs/cmdline-opts/http2.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: http2
5*6236dae4SAndroid Build Coastguard WorkerTags: Versions
6*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.33.0
8*6236dae4SAndroid Build Coastguard WorkerMutexed: http1.1 http1.0 http2-prior-knowledge http3
9*6236dae4SAndroid Build Coastguard WorkerRequires: HTTP/2
10*6236dae4SAndroid Build Coastguard WorkerHelp: Use HTTP/2
11*6236dae4SAndroid Build Coastguard WorkerCategory: http
12*6236dae4SAndroid Build Coastguard WorkerMulti: mutex
13*6236dae4SAndroid Build Coastguard WorkerSee-also:
14*6236dae4SAndroid Build Coastguard Worker  - http1.1
15*6236dae4SAndroid Build Coastguard Worker  - http3
16*6236dae4SAndroid Build Coastguard Worker  - no-alpn
17*6236dae4SAndroid Build Coastguard WorkerExample:
18*6236dae4SAndroid Build Coastguard Worker  - --http2 $URL
19*6236dae4SAndroid Build Coastguard Worker---
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard Worker# `--http2`
22*6236dae4SAndroid Build Coastguard Worker
23*6236dae4SAndroid Build Coastguard WorkerUse HTTP/2.
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard WorkerFor HTTPS, this means curl negotiates HTTP/2 in the TLS handshake. curl does
26*6236dae4SAndroid Build Coastguard Workerthis by default.
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard WorkerFor HTTP, this means curl attempts to upgrade the request to HTTP/2 using the
29*6236dae4SAndroid Build Coastguard WorkerUpgrade: request header.
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard WorkerWhen curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or
32*6236dae4SAndroid Build Coastguard Workerhigher even though that is required by the specification. A user can add this
33*6236dae4SAndroid Build Coastguard Workerversion requirement with --tlsv1.2.
34