<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,8 +33,9 @@ class EpiCurl
 
   public function addCurl($ch)
   {
-    $key = (string)$ch;
+    $key = $this-&gt;getKey($ch);
     $this-&gt;requests[$key] = $ch;
+    curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, 'headerCallback'));
 
     $code = curl_multi_add_handle($this-&gt;mc, $ch);
     
@@ -78,7 +79,7 @@ class EpiCurl
           $innerSleepInt = 1;
         }
         $this-&gt;storeResponses();
-        if(isset($this-&gt;responses[$key]))
+        if(isset($this-&gt;responses[$key]['data']))
         {
           return $this-&gt;responses[$key];
         }
@@ -89,6 +90,24 @@ class EpiCurl
     return false;
   }
 
+  private function getKey($ch)
+  {
+    return (string)$ch;
+  }
+
+  private function headerCallback($ch, $header)
+  {
+    $_header = trim($header);
+    $colonPos= strpos($_header, ':');
+    if($colonPos &gt; 0)
+    {
+      $key = substr($_header, 0, $colonPos);
+      $val = preg_replace('/^\W+/','',substr($_header, $colonPos));
+      $this-&gt;responses[$this-&gt;getKey($ch)]['headers'][$key] = $val;
+    }
+    return strlen($header);
+  }
+
   private function storeResponses()
   {
     while($done = curl_multi_info_read($this-&gt;mc))</diff>
      <filename>EpiCurl.php</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ class EpiTwitter extends EpiOAuth
     // calls which do not have a consumerKey are assumed to not require authentication
     if($this-&gt;consumerKey === null)
     {
-      $query = isset($args) ? http_build_query($args, '', '&amp;') : '';
+      $query = !is_null($args) ? http_build_query($args, '', '&amp;') : '';
       $url = (preg_match('@^/(search|trends)@', $path) ? $this-&gt;searchUrl : $this-&gt;apiUrl) . &quot;{$path}?{$query}&quot;;
       $ch  = curl_init($url);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@ -131,7 +131,7 @@ class EpiTwitterJson implements ArrayAccess, Countable, IteratorAggregate
 
   public function __get($name)
   {
-    if(($this-&gt;__resp-&gt;code &lt; 200 || $this-&gt;__resp-&gt;code &gt;= 400) &amp;&amp; $name !== 'responseText')
+    if(($this-&gt;__resp-&gt;code &lt; 200 || $this-&gt;__resp-&gt;code &gt;= 400) &amp;&amp; $name !== 'responseText' &amp;&amp; $name !== 'headers') // TODO: clean up
     {
       switch($this-&gt;__auth)
       {
@@ -146,6 +146,7 @@ class EpiTwitterJson implements ArrayAccess, Countable, IteratorAggregate
 
     $this-&gt;responseText = $this-&gt;__resp-&gt;data;
     $this-&gt;code         = $this-&gt;__resp-&gt;code;
+    $this-&gt;headers      = $this-&gt;__resp-&gt;headers;
     $this-&gt;response     = json_decode($this-&gt;responseText, 1);
     $this-&gt;__obj        = json_decode($this-&gt;responseText);
 </diff>
      <filename>EpiTwitter.php</filename>
    </modified>
    <modified>
      <diff>@@ -295,4 +295,10 @@ class EpiTwitterTest extends PHPUnit_Framework_TestCase
     $resp2 = $this-&gt;twitterObj-&gt;get_accountVerify_credentials();
     $this-&gt;assertEquals($status, $resp2-&gt;status-&gt;text, 'The destructor did not ensure that the status was updated');
   }
+
+  function testHeaders()
+  {
+    $resp = $this-&gt;twitterObj-&gt;get_statusesFollowers();
+    $this-&gt;assertTrue(!empty($resp-&gt;headers['Status']), 'header status response should not be empty');
+  }
 }</diff>
      <filename>tests/EpiTwitterTest.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d5b21a57314748e436b4cc95d650be1760112c3d</id>
    </parent>
  </parents>
  <author>
    <name>Jaisen Mathai</name>
    <email>jaisen@jmathai.com</email>
  </author>
  <url>http://github.com/jmathai/twitter-async/commit/5ce7b8af93fff122c1739b9a9e88df592eaa47ba</url>
  <id>5ce7b8af93fff122c1739b9a9e88df592eaa47ba</id>
  <committed-date>2009-09-29T22:58:12-07:00</committed-date>
  <authored-date>2009-09-29T22:58:12-07:00</authored-date>
  <message>Added support for accessing the response headers.
Closes gh-24</message>
  <tree>c051623839cf2141ce5c55bc2d5ed9a79dcf0670</tree>
  <committer>
    <name>Jaisen Mathai</name>
    <email>jaisen@jmathai.com</email>
  </committer>
</commit>
