curl / Mailing Lists / curl-library / Single Mail


How to set/change single custom header?

From: Grant Edwards via curl-library <>
Date: Thu, 11 Apr 2019 16:12:13 -0500

I create a POST request with curl_easy_init(), set various options,
then add a set of custom headers with curl_easy_setopt(curl,CURLOPT_HTTPHEADER, headers).

I want to perform that request repeatedly with different data. That
works works fine.

Next, I'd like to change the value of _one_ of the custom headers each
time the request is perfomred. I can't figure out how to do that.

It appears there's no way to add/set a single custom header without
clearing all of the previously set custom headers. Is that correct?

Received on 2019-04-11