curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.


From: Daniel Stenberg via curl-library <>
Date: Thu, 10 Oct 2019 11:03:11 +0200 (CEST)

On Thu, 10 Oct 2019, ka sc via curl-library wrote:

> url_flags = "\"[\\\"INSERT INTO foo2 values(1,11)\\\"]\"";
> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, url_flags.c_str());
> Is there a way to see the output url so I can try that in commandline?

The data you set with CURLOPT_POSTFIELDS is not part of the URL - it is part
of the request body - so seeing the URL won't help you.

You can see the URL with CURLOPT_VERBOSE set to 1L, but since you probably
rather see the request body so that you get to see what you post you want to
add a CURLOPT_DEBUGFUNCTION callback and show the data that way.

Possibly based on this example code:

Alternatively, you make a command line version of the request with curl that
works and then you convert that to libcurl code with the "--libcurl code.c"

  / | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
Received on 2019-10-10