On Thu, Dec 11, 2014 at 12:52 AM, Jeroen Ooms wrote:

> I'm writing some bindings to libcurl for a scripting language. I was
> wondering if there is an API call or some other method to list the
> options (CURLOPT_* values and their integer) that the linked version
> of libcurl supports?
>
> That would make it easier to test in the client if a particular option
> is available, and pass it to libcurl as the corresponding integer. I'm
> not sure how else to design a client where the user can specify an
> option (as a string), and then have it resolve to the appropriate
> CURLOPT value.


I guess something like this one-liner would get you halfway there:

  cpp -Dm /usr/include/curl/curl.h | grep '^ *CURLOPT_'

Of course this assumes that "curl.h" is the same version as your lib.

 - Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to