1CURLOPT_DEBUGDATA(3)       curl_easy_setopt options       CURLOPT_DEBUGDATA(3)
2
3
4

NAME

6       CURLOPT_DEBUGDATA - pointer passed to the debug callback
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGDATA, void *pointer);
12

DESCRIPTION

14       Pass  a  pointer  to whatever you want passed in to your CURLOPT_DEBUGā€
15       FUNCTION(3) in the last void * argument. This pointer is  not  used  by
16       libcurl, it is only passed to the callback.
17

DEFAULT

19       NULL
20

PROTOCOLS

22       All
23

EXAMPLE

25       int main(void)
26       {
27         CURL *curl;
28         CURLcode res;
29         struct data my_tracedata;
30
31         curl = curl_easy_init();
32         if(curl) {
33           curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
34
35           curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &my_tracedata);
36
37           /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
38           curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
39
40           curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
41           res = curl_easy_perform(curl);
42
43           /* always cleanup */
44           curl_easy_cleanup(curl);
45         }
46         return 0;
47       }
48

AVAILABILITY

50       Always
51

RETURN VALUE

53       Returns CURLE_OK
54

SEE ALSO

56       CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
57
58
59
60libcurl 7.85.0                   May 17, 2022             CURLOPT_DEBUGDATA(3)
Impressum