Debugging
Debugging transmitted requests and responses with pecl_http is actually pretty simple. Configure and send a request, then call the getRawRequestMessage and getRawResponseMessage methods on the request instance as shown below.
<?php
$request = new HttpRequest('http://localhost.example/index.php');
// configure $request
$request->send();
// returns a string containing the entire request
echo $request->getRawRequestMessage();
// returns a string containing the entire response
echo $request->getRawResponseMessage();
?>
© pecl_http PECL Extension — Web Scraping >>> Back to TABLE OF CONTENTS <<< | |
| Views: 438 | |
| Total comments: 0 | |