curl_easy_reset(3)
π curl_easy_reset(3) β your fave libcurl glow-up reset button β¨
okay so bestie, this little gem lives in the Library Functions Manual (very official, very demure) and honestly it's giving "factory reset but make it cute" π
β¨ NAME β¨
curl_easy_reset β resets, like, every single option on a libcurl session handle. yes. all of them. π§Ή
πΈ SYNOPSIS πΈ
#include <curl/curl.h>
void curl_easy_reset(CURL *handle);
π¦ DESCRIPTION π¦
So here's the tea β β curl_easy_reset re-initializes all the options you previously set on a specified curl handle back to their default values. It literally puts the handle back into the exact same state it was in when it was freshly created with curl_easy_init(3). brand new. no cap. π«
But wait β it does NOT change the following info that's still vibing inside the handle:
- live connections π
- the Session ID cache
- the DNS cache
- the cookies πͺ
- the shares
- the alt-svc cache
so like, it's a reset but it's not a reset reset, yk? the handle keeps its whole social life, it just forgets its preferences π
π PROTOCOLS π
This functionality affects all supported protocols β every single one, no gatekeeping, periodt π
π EXAMPLE π
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
/* ... the handle is used and options are set ... */
curl_easy_reset(curl);
}
}
look at that little main character handle getting its options set and then getting reset π iconic behavior honestly
β AVAILABILITY β
Added in curl 7.12.1 β so it's been serving looks since way back π«Ά
π RETURN VALUE π
Nothing. it returns void, it does not return a value, it is unbothered, it is at peace π§ββοΈ
fr fr do not try to assign its return value to anything, there is literally nothing there π
π₯ SEE ALSO π₯
and that's the whole page bestie!! β¨
this masterpiece was brought to you by libcurl, dated 2026-10-12, in the curl_easy_reset(3) era β mwah, love u, go reset something ππ
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms