Name
easy:SetOpt_DebugFunction -- debug callback
Synopsis
easy:SetOpt_DebugFunction(debug_callback[, userdata])
Function
Pass a callback function. This function replaces the standard debug function used when #CURLOPT_VERBOSE is in effect. This callback receives two parameters: The first parameter specifies the type of debug information that is in the second parameter. This can currently be one of the following special values:

#CURLINFO_TEXT
The data is informational text.
#CURLINFO_HEADER_IN
The data is header (or header-like) data received from the peer.
#CURLINFO_HEADER_OUT
The data is header (or header-like) data sent to the peer.
#CURLINFO_DATA_IN
The data is protocol data received from the peer.
#CURLINFO_DATA_OUT
The data is protocol data sent to the peer.
#CURLINFO_SSL_DATA_OUT
The data is SSL/TLS (binary) data sent to the peer.
#CURLINFO_SSL_DATA_IN
The data is SSL/TLS (binary) data received from the peer.

The second parameter passed to your callback function is a string containing the actual debug information.

If you pass the optional userdata argument, the value you pass in userdata will be passed to your callback function as a third parameter. The userdata parameter can be of any type.

Your debug callback shouldn't return anything.

Inputs
debug_callback
input value
userdata
optional: user data to pass to callback function

Show TOC