curl / Mailing Lists / curl-users / 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.

How to get Libcurl output into a Buffer?

From: Lijin TV via curl-users <>
Date: Mon, 19 Oct 2020 10:01:49 +0530


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

    /* always cleanup */
  return 0;

Thanks & Regards-

Received on 2020-10-19