/** * Collect debug information on the last call. * * @return array * @uses self::$client */ public function debugCall() { return array('event' => $this->client->getLastEvent(), 'url' => (string) $this->client->getUrl(), 'data' => $this->client->getBody(), 'method' => $this->client->getMethod()); }
<?php require 'HTTP/Request2.php'; $r = new HTTP_Request2('http://www.example.com/submit.php'); $r = new HTTP_Request2('http://localhost/submit.php'); $r->setMethod(HTTP_Request2::METHOD_POST)->addPostParameter('monkey', 'uncle'); $response = $r->send(); print_r($r->getLastEvent());