curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to make libcurl show content while updating?

From: Rodrigo Zanatta Silva <rodrigozanattasilva_at_gmail.com>
Date: Thu, 2 Mar 2017 19:07:28 -0300

Lol, but you don't understand. The libcurl will only get the page after it
finish. So, it will take 110 seconds and than show all eleven lines.

But, can I get PARTIAL result? Like every 5 seconds read the *stdout* of
the server, like:

*TIME 0: Call the URL*

*TIME 5: Read*
line 0

*TIME 10: Read*
line 0
line 1

*TIME 15: Read*
line 0
line 1

*TIME 20: Read*
line 0
line 1
line 2
*TIME 25: Read*
...
*TIME 110: Finish*
(only now curl print everything)

Is this possible? Or do I need to use another strategy? Like write this in
file and read it.

2017-03-02 18:16 GMT-03:00 Daniel Stenberg <daniel_at_haxx.se>:

> On Wed, 1 Mar 2017, Rodrigo Zanatta Silva wrote:
>
> How can I make libcurl show this page while it is building, like in
>> browser?
>>
>
> libcurl delivers the data to the application as it arrives so it is up to
> the application to deal with that. Like a browser or otherwise.
>
> --
>
> / daniel.haxx.se
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-02