curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: how to make requests of http2 using curl

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 17 Dec 2019 02:42:32 -0500

On 12/17/2019 2:26 AM, Daniel Stenberg via curl-library wrote:
> On Tue, 17 Dec 2019, peng xu via curl-library wrote:
>
>> I have wriiten the code below to make a http2 request, but the debug
>> info showed me that it's http 1.1, would you please tell me why and
>> how should I amend it:
>
> Does your libcurl support HTTP/2 to begin with?

 ?? {
 ?????? curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
 ?????? printf("HTTP2 is %s\n", ((info->features & CURL_VERSION_HTTP2) ?
"supported" : "NOT supported"));
 ?????? printf("%s\n", curl_version());
 ?? }

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-12-17