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