I'm using the PEAR library Http_Request2. I've been unsuccessfully searching for documentation on how to make a PUT request and pass parameters to a webservice. Can anyone provide some help?
For a POST request, it's easy:
$request = new HTTP_Request2 ( "http://my.url.com");
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->addPostParameter('data', "blah"); //easy to add post params...
$response = $request->send();
However, I can't figure how to send data when changing the method to PUT:
$request = new HTTP_Request2 ( "http://my.url.com");
$request->setMethod(HTTP_Request2::METHOD_PUT);
// ????? missing secret sauce to add data to put request....
$response = $request->send();
Anyone lend a hand?