Pro tip: Use `CURLOPT_WRITEFUNCTION` if you wanna handle the response data yourself. Otherwise, curl just dumps it to stdout.
Here’s a snippet:
```c
size_t write_callback(void *data, size_t size, size_t nmemb, void *userp) {
// process data here
return size * nmemb;
}
// In main():
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
```
This way, you can store responses in a buffer or file.
Here’s a snippet:
```c
size_t write_callback(void *data, size_t size, size_t nmemb, void *userp) {
// process data here
return size * nmemb;
}
// In main():
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
```
This way, you can store responses in a buffer or file.
