title: Get cUrl to preemptively send Authorization header for DIGEST authentication in PHP
body: <p>We have a PHP page (actually a WordPress plugin) which makes calls to a REST API with DIGEST authentication. The curl handle is created on a per request basis, given authorisation credentials and successfully authenticates.</p>
  
  <p>PROBLEM:</p>
  
  <p>Under the hood, Curl is sending two requests. The first fails with a 401 and a challenge, the second contains an Authorization header and succeeds (200)</p>
  
  <p>Upon subsequent API calls cUrl continues to send two requests. This seems inefficient, causing 2 x network latency to be added to the duration of the operation.</p>
  
  <p>How do we cause cURL to "pre-emptively authenticate" (<a href="http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authentication" rel="nofollow">example</a>) future requests? </p>
  
  <p>Does Curl Multi have this feature?</p>