Esempio n. 1
0
 /**
  * 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());
 }
Esempio n. 2
0
<?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());