cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Need suggestion o how to handle subsequent authorization challenge.

From: Yehezkel Horowitz <horowity_at_checkpoint.com>
Date: Thu, 27 Nov 2014 16:14:38 +0000

> Is there anyway I can get thisĀ  authorization request header from curl handle and reuse it in
subsequent requests ?

You can save the following info in your application
  host:port - key
  user name
  password (just make sure you keep it in a secure location, and allow the user to make your application forget this info)
  authentication method

Once you have this info - you can use curl options to do the authentication for you.
Relevant curl options are:
CURLOPT_HTTPAUTH
CURLOPT_USERPWD or CURLOPT_USERNAME + CURLOPT_PASSWORD

HTH
Yehezkel Horowitz

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-27