curl_easy_reset(3)

curl_easy_reset3

Reset all options of a libcurl session handle

Usage

#include <curl/curl.h>
void curl_easy_reset(CURL *handle);

Overview

Re-initializes all options previously set on a specified curl handle to the default values. This puts back the handle to the same state as it was in when it was created with curl_easy_init(3).

It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies, the shares or the alt-svc cache.

Protocols

This functionality affects all supported protocols

Examples

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    /* ... the handle is used and options are set ... */
    curl_easy_reset(curl);
  }
}

Return value

Nothing

Releases

11 releases since Debian 4.0 (Etch); the text changed 8 times.

  1. 4.0–5.0
  2. 6.0
  3. 7–8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

Availability

Added in curl 7.12.1

From curl 8.23.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.