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.

How to get Libcurl output into a Buffer?

From: Lijin TV via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 19 Oct 2020 10:01:49 +0530

Hello,

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");
    res = curl_easy_perform(curl);

    /* always cleanup */
    curl_easy_cleanup(curl);
  }
  return 0;
}


-- 
Thanks & Regards-
*LIJIN T V,*


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