curl / libcurl / API / curl_easy_setopt / CURLOPT_H3

CURLOPT_H3 explained

NAME

CURLOPT_H3 - specify HTTP/3 protocol behavior

SYNOPSIS

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_H3, long bitmask);

EXPERIMENTAL

Warning: this feature is early code and is marked as experimental. It can only be enabled by explicitly invoking configure with --with-quiche or --with-ngtcp2. You are advised to not ship this feature used in production before the experimental label is removed.

DESCRIPTION

This function accepts a long bitmask with a set of flags set that controls the HTTP/3 behavior for this transfer.

DEFAULT

0

PROTOCOLS

HTTPS

EXAMPLE

CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_H3, (long)0);
  ret = curl_easy_perform(curl);
}

AVAILABILITY

Added in 7.66.0

RETURN VALUE

Returns CURLE_OK if supported, an error otherwise.

SEE ALSO

CURLOPT_HTTP_VERSION

This HTML page was made with roffit.