cURL / Mailing Lists / curl-library / Single Mail

curl-library

FW: Using Libcurl in linux

From: Soni, Vijay <Vijay.Soni_at_voith.com>
Date: Mon, 30 Dec 2013 09:10:07 +0000

Dear Team,

Thank you so much for creating a multi-purpose very useful library!!!

I am Software developer in an MNC working in library development using C++.

Library functions:
            ==> To fetch JSON string from URLs using REST API, we use SQL Server 2008 R2 as a Back end for Database.
            ==> Condition:
                        1) Working environment Windows 7 - 64bit
                                    It uses NTLM authentication for getting access to the Rest API and fetch JSON string.

                                    Part of the code is as:
                                    curl_global_init(CURL_GLOBAL_ALL);
                     curl_handle = curl_easy_init();/* init the curl session */
                     curl_easy_setopt(curl_handle, CURLOPT_URL, "http://MyRestApiURL/Format=json <http://MyRestApiURL/Format=json%20> ");/* set URL to get */
                     curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); ///< For NTLM authentication
                     curl_easy_setopt(curl_handle, CURLOPT_USERPWD, ":"); ///< For current user
                     curl_easy_setopt(curl_handle, CURLOPT_HTTPGET,1);
                     curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);
                     curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);

                        2) Working environment Linux
                                    It gives access denied message while using the same code.

Please guide what kind of authentication is required in linux environment.

Thanks in advance!!!

Best Regards,
Vijay Kumar Soni

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-30