I\'d like to see what the post fields in the request are before I send it. (For debugging purposes).
The PHP library (class) I am using is already made (not by me),
You can enable the CURLOPT_VERBOSE option:
CURLOPT_VERBOSE
curl_setopt($curlhandle, CURLOPT_VERBOSE, true);
When CURLOPT_VERBOSE is set, output is written to STDERR or the file specified using CURLOPT_STDERR. The output is very informative.
CURLOPT_STDERR
You can also use tcpdump or wireshark to watch the network traffic.