$args = $this->testArgs($notice);
common_debug("Blogspamnet args = " . print_r($args, TRUE));
$requestBody = xmlrpc_encode_request('testComment', array($args));
-
- $request = new HTTPClient($this->baseUrl, HTTP_Request2::METHOD_POST);
- $request->addHeader('Content-Type: text/xml');
- $request->setBody($requestBody);
- $httpResponse = $request->send();
-
+
+ $request = HTTPClient::start();
+ $httpResponse = $request->post($this->baseUrl, array('Content-Type: text/xml'), $requestBody);
+
$response = xmlrpc_decode($httpResponse->getBody());
if (xmlrpc_is_fault($response)) {
throw new ServerException("$response[faultString] ($response[faultCode])", 500);