X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBlogspamNetPlugin.php;h=51236001aa3fb9aca78ed0a65de62a4a299c7622;hb=5a1cbdc6f1e32be7b8430924a1125422d8457584;hp=3bdc73556152fe15e6cc72ab62c8679c855bd2df;hpb=fa37967858c3c29000797e510e5f98aca8ab558f;p=quix0rs-gnu-social.git diff --git a/plugins/BlogspamNetPlugin.php b/plugins/BlogspamNetPlugin.php index 3bdc735561..51236001aa 100644 --- a/plugins/BlogspamNetPlugin.php +++ b/plugins/BlogspamNetPlugin.php @@ -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);