HTTP_Request
| From: | Ian Warner | Date: | Tue, 25 Jul 2006 09:51:49 +0000 |
| Subject: | HTTP_Request | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-43564@lists.php.net to get a copy of this message | ||
Hi
Is there any way to print out exactly what HTTP Request is posting? A sort of debug for this package?
Also the PUT command how should the data to be sent be allocated to the send?
// If method is POST then use the addPostData otherwise it should be
// addQueryString for GET command.
if ($params['method'] == 'POST') {
foreach ($url as $k => $v) {
$req->addPostData($k, $v);
}
} elseif ($params['method'] == 'GET') {
foreach ($url as $k => $v) {
$req->addQueryString($k, $v);
}
} elseif ($params['method'] == 'PUT') {
foreach ($url as $k) {
$req->addQueryString($k);
}
}
Cheers
Ian