1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_VERBOSE
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_DEBUGFUNCTION (3)
9  - CURLOPT_ERRORBUFFER (3)
10  - CURLOPT_STDERR (3)
11  - curl_global_trace (3)
12---
13
14# NAME
15
16CURLOPT_VERBOSE - verbose mode
17
18# SYNOPSIS
19
20~~~c
21#include <curl/curl.h>
22
23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff);
24~~~
25
26# DESCRIPTION
27
28Set the *onoff* parameter to 1 to make the library display a lot of
29verbose information about its operations on this *handle*. Useful for
30libcurl and/or protocol debugging and understanding. The verbose information
31is sent to stderr, or the stream set with CURLOPT_STDERR(3).
32
33You hardly ever want this enabled in production use, you almost always want
34this used when you debug/report problems.
35
36To also get all the protocol data sent and received, consider using the
37CURLOPT_DEBUGFUNCTION(3).
38
39# DEFAULT
40
410, meaning disabled.
42
43# PROTOCOLS
44
45All
46
47# EXAMPLE
48
49~~~c
50int main(void)
51{
52  CURL *curl = curl_easy_init();
53  if(curl) {
54    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
55
56    /* ask libcurl to show us the verbose output */
57    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
58
59    /* Perform the request */
60    curl_easy_perform(curl);
61  }
62}
63~~~
64
65# AVAILABILITY
66
67Always
68
69# RETURN VALUE
70
71Returns CURLE_OK
72