]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/BlogspamNetPlugin.php
Plugin to enable OpenX ads
[quix0rs-gnu-social.git] / plugins / BlogspamNetPlugin.php
index 3bdc73556152fe15e6cc72ab62c8679c855bd2df..51236001aa3fb9aca78ed0a65de62a4a299c7622 100644 (file)
@@ -71,12 +71,10 @@ class BlogspamNetPlugin extends Plugin
         $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);