1 # http\Message http\Client::getHistory()
3 Simply returns the http\Message chain representing the request/response history.
5 > **Note:** The history is only recorded while http\Client::$recordHistory is true.
13 * http\Message, the request/response message chain representing the client's history.
18 $client = new http\Client;
19 $client->enqueue(new http\Client\Request("HEAD", "http://php.net"));
20 $client->enqueue(new http\Client\Request("HEAD", "http://pecl.php.net"));
21 $client->enqueue(new http\Client\Request("HEAD", "http://pear.php.net"));
22 $client->recordHistory = true;
25 echo $client->getHistory()->toString(true);
30 User-Agent: PECL::HTTP/2.0.0dev (PHP/5.5.5)
36 Date: Mon, 04 Nov 2013 15:41:48 GMT
38 X-Powered-By: PHP/5.3.6
40 Content-Type: text/html; charset=UTF-8
44 User-Agent: PECL::HTTP/2.0.0dev (PHP/5.5.5)
50 Date: Mon, 04 Nov 2013 14:34:02 GMT
52 X-Powered-By: PHP/5.2.17
54 Expires: Thu, 19 Nov 1981 08:52:00 GMT
55 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
58 Content-Type: text/html; charset=ISO-8859-1
62 User-Agent: PECL::HTTP/2.0.0dev (PHP/5.5.5)
69 Date: Mon, 04 Nov 2013 14:34:08 GMT
70 Content-Type: text/html;charset=utf-8
71 Connection: keep-alive
72 X-Powered-By: PHP/5.5.4-1
75 Last-Modified: Mon, 04 Nov 2013 21:00:36 GMT