curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: use libcurl in a customized environment

From: Gregory Davis <gregory.k.davis_at_stonybrook.edu>
Date: Thu, 15 Dec 2016 13:58:57 -0500

thanks alex
i was not using the handlers you had
thanks again

Thank you. Please feel free to contact me if you have any questions or if I can help you in any way
Have a great day.

Gregory Davis
Audio Visual Services
222 Javits Lecture Center
Stony Brook NY 11794-2699
Phone (631) 304-4563

> On Dec 15, 2016, at 12:53 PM, Alex Bligh <alex_at_alex.org.uk> wrote:
>
>
>> On 15 Dec 2016, at 17:39, Gregory Davis <gregory.k.davis_at_stonybrook.edu> wrote:
>>
>> i am having no luck decompiling this curl commands lines
>>
>> curl --user admin:jlc115 -k --url https://129.59.80.202:8443/status/monitoring
>>
>>
>>
>>
>> curl -u admin:jlc115 -k -d ‘' --url https://129.59.80.202:8443/capture/pause
>>
>>
>>
>> i need to see the c source code version of these commands and lib curl does not seem to work fro me
>>
>> i am using the terminal command in a mac environment
>
> It works perfectly well for me:
>
> $ curl --libcurl /tmp/x.c -u admin:jlc115 -k -d '' --url https://127.0.0.1/capture/pause
>
> (note IP address changed so I don't contact your server)
>
> produces a file /tmp/x.c per the below.
>
> --
> Alex Bligh
>
>
>
> $ cat /tmp/x.c
> /********* Sample code generated by the curl command line tool **********
> * All curl_easy_setopt() options are documented at:
> * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
> ************************************************************************/
> #include <curl/curl.h>
>
> int main(int argc, char *argv[])
> {
> CURLcode ret;
> CURL *hnd;
>
> hnd = curl_easy_init();
> curl_easy_setopt(hnd, CURLOPT_URL, "https://127.0.0.1/capture/pause");
> curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
> curl_easy_setopt(hnd, CURLOPT_USERPWD, "admin:jlc115");
> curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "");
> curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.43.0");
> curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
> curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
> curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
> curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
>
> /* Here is a list of options the curl code used that cannot get generated
> as source easily. You may select to either not use them or implement
> them yourself.
>
> CURLOPT_WRITEDATA set to a objectpointer
> CURLOPT_WRITEFUNCTION set to a functionpointer
> CURLOPT_READDATA set to a objectpointer
> CURLOPT_READFUNCTION set to a functionpointer
> CURLOPT_SEEKDATA set to a objectpointer
> CURLOPT_SEEKFUNCTION set to a functionpointer
> CURLOPT_ERRORBUFFER set to a objectpointer
> CURLOPT_STDERR set to a objectpointer
> CURLOPT_HEADERFUNCTION set to a functionpointer
> CURLOPT_HEADERDATA set to a objectpointer
>
> */
>
> ret = curl_easy_perform(hnd);
>
> curl_easy_cleanup(hnd);
> hnd = NULL;
>
> return (int)ret;
> }
> /**** End of sample code ****/
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-12-15