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 get Libcurl output into a Buffer?

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 19 Oct 2020 01:40:10 -0400

On 10/19/2020 12:31 AM, Lijin TV via curl-library wrote:
> |I want to store the result of this curl function into a buffer, how
> can I do so? #include <stdio.h> #include <curl/curl.h> int main(void)
> { CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, "www.example.com
> <http://www.example.com>"); res = curl_easy_perform(curl); /* always
> cleanup */ curl_easy_cleanup(curl); } return 0; }|


Please refer to the included documentation or the website [1] before
asking these questions. Also please ask a single appropriate list
instead of e-mail both lists. Since you are asking questions about
libcurl, curl-library is the right list, not curl-tool. The getinmemory
example [2] shows how you can write a response to memory.


[1]: https://curl.haxx.se/libcurl/c/
[2]: https://curl.haxx.se/libcurl/c/getinmemory.html




-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-19