On Wed, 22 May 2013, narayanan manikandan wrote:

If i hardcode the username / password it works. But I do not want to get the user name and password by my application; I would prefer that libcurl can requests these at the start of a transfer.

I think there's something between these lines that you're not telling us, and I've decided to guess what you're actually talking about. Feel free to point out my mistakes.

Why would libcurl figure out the user name and password? It simply can't know them, your program has to provide that information. But given the way you prase the question, and the fact that you go on and mention winhttp, we know you're talking about a Windows solution so... your program doesn't know the user namd and password either, does it? You want libcurl to magically find that out from your Windows system somehow, right?

libcurl _can_ do that in some limited situations. Like if your libcurl was built with SSPI support and you use NTLM, you can set the "userpwd" to just ":" as a sort of magic hint to libcurl and then it will get and use the user+password of the current user for that HTTP request.

Is there a different library i can use like winhttp or libcurl is the best one to use?

There are numerous libcurl alternatives. I don't think I'm the most suitable to comment on their individual qualities, but I've tried to collect some of them (that are free) with information and comparisons here:

  http://curl.haxx.se/libcurl/competitors.html

I encourage you to try around and pick whichever suit you the best!

--

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

Reply via email to