curl / Mailing Lists / curl-library / Single Mail

curl-library

How to set/change single custom header?

From: Grant Edwards via curl-library <curl-library_at_cool.haxx.se>
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?

--
Grant
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-04-11