X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=lib%2FXmlRpcClient.php;fp=lib%2FXmlRpcClient.php;h=c7abb2a04592aac4979ab118e0305522dc4492d1;hp=83a154e933448a37883e4d5e1bf3ffbc32f63823;hb=aebfa7783e7b280bff4975649b20494e5eb932bc;hpb=2a929fe95c4303891769139d42440a3670e76033 diff --git a/lib/XmlRpcClient.php b/lib/XmlRpcClient.php index 83a154e..c7abb2a 100644 --- a/lib/XmlRpcClient.php +++ b/lib/XmlRpcClient.php @@ -22,7 +22,7 @@ * @copyright Michael Wallner, * @license BSD, revised * @package pecl/http - * @version $Revision$ + * @version $Revision$ */ class XmlRpcClient { @@ -56,8 +56,7 @@ class XmlRpcClient */ public function __construct($url, $namespace = '', array $options = null) { - $this->__request = new HttpRequest($url, HTTP_METH_POST); - $this->__request->setOptions($options); + $this->__request = new HttpRequest($url, HttpRequest::METH_POST, $options); $this->__namespace = $namespace; } @@ -75,8 +74,9 @@ class XmlRpcClient $method = $this->__namespace .'.'. $method; } $this->__request->setContentType("text/xml; charset=". $this->__encoding); - $request = xmlrpc_encode_request($method, $params, array("encoding" => $this->__encoding)); - $this->__request->setRawPostData($request); + $this->__request->setRawPostData( + xmlrpc_encode_request($method, $params, + array("encoding" => $this->__encoding))); $this->__request->send(); $response = $this->__request->getResponseMessage(); if ($response->getResponseCode() != 200) {