curl / Mailing Lists / curl-users / Single Mail


Re: Application to request http2 content with multiple streams

From: Daniel Stenberg <>
Date: Mon, 6 Aug 2018 08:54:14 +0200 (CEST)

On Sun, 5 Aug 2018, Rajvardhan Deshmukh wrote:

First: this is the mailing list for users of the curl tool. The curl-library
mailing list is much more suitable for libcurl users and hackers.

> 1. I intend to write an application to get content over HTTP2 over
> multiple-streams over one connection. With the command line tool [1] i could
> get content over single stream.

The command line tool still only does transfers serially, but it will reuse
the same connection and thus do multiple streams if it can. Just not

> I found this snippet [2] that helped me write this [3]. But I need to
> include the TLS version and ssl certificate details as specified with
> the command line tool [1]
> Can you tell me which additional symbols i should use to set the
> certificate?

Add "--libcurl template.c" to your command line arguments and you'll get a
good start!

> 2. I also need to identify the api which requests chunks of data (so that
> not all response data is written to the memory at the same time, but as
> multiple of chunks). (Just like the 'iter_content(CHUNK_SIZE)' in the
> requests [4] python library)

libcurl always delivers the response chunk by chunk with the write callback:

Received on 2018-08-06