mirror of
https://github.com/curl/curl.git
synced 2026-07-28 04:53:08 +03:00
examples/http3.c: use CURL_HTTP_VERSION_3
and update the comment Closes #10619
This commit is contained in:
parent
22eec78027
commit
49a9f13c39
1 changed files with 2 additions and 4 deletions
|
|
@ -37,11 +37,9 @@ int main(void)
|
|||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Forcing HTTP/3 will make the connection fail if the server is not
|
||||
accessible over QUIC + HTTP/3 on the given host and port.
|
||||
Consider using CURLOPT_ALTSVC instead! */
|
||||
/* Use HTTP/3 but fallback to earlier HTTP if necessary */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION,
|
||||
(long)CURL_HTTP_VERSION_3ONLY);
|
||||
(long)CURL_HTTP_VERSION_3);
|
||||
|
||||
/* Perform the request, res will get the return code */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue