cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Setting user name and password

From: Andre Guibert de Bruet <andy_at_siliconlandmark.com>
Date: Thu, 24 May 2007 04:30:02 -0400 (EDT)

On Thu, 24 May 2007, saravanan jayakumar wrote:

> I am trying to set user name, password using
> curl_easy_setopt(curl, CURLOPT_USERPWD, upwd),
> but the authentication fails. Is the operation same as WinHttpSetCredentials?, or there are other ways of setting username and password separtely?

Jay,

Make sure that you are seperating the user name and password by a ":". The
form you are looking for is:

   curl_easy_setopt(curl, CURLOPT_USERPWD, "username:password"),

Cheers,

/* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */
/* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */
/* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */
/* WWW: siliconlandmark.com * Tormenting bytes since 1980. */
Received on 2007-05-24