public function make_http_request($uri, $headers, $content)
    {
        $post = curl_init($uri);
        curl_setopt_array($post, array(
            CURLOPT_POST => true,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_HTTPHEADER => $headers,
            CURLOPT_POSTFIELDS => json_encode($content)
        ));
        $response = curl_exec($post);
        if (curl_error($post) != '')
            throw new \RuntimeException('Failed to publish: ' . 
                    curl_error($post));
        return array($response, 
                intval(curl_getinfo($post, CURLINFO_HTTP_CODE)));
    }
public function make_http_request($uri, $headers, $content)
    {
        $post = curl_init($uri);
        curl_setopt_array($post, array(
            CURLOPT_POST => true,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_HTTPHEADER => $headers,
            CURLOPT_POSTFIELDS => json_encode($content)
        ));
        $response = curl_exec($post);
        if (curl_error($post) != '')
            throw new \RuntimeException('Failed to publish: ' . 
                    curl_error($post));
        return array($response, 
                intval(curl_getinfo($post, CURLINFO_HTTP_CODE)));
    }
public function make_http_request ( $ uri , $ headers , $ content ) { $ post = curl_init ( $ uri ) ; curl_setopt_array ( $ post , array ( CURLOPT_POST => true , CURLOPT_RETURNTRANSFER => true , CURLOPT_HTTPHEADER => $ headers , CURLOPT_POSTFIELDS => json_encode ( $ content ) ) ) ; $ response = curl_exec ( $ post ) ; if ( curl_error ( $ post ) != '' ) throw new \ RuntimeException ( 'Failed to publish: ' . curl_error ( $ post ) ) ; return array ( $ response , intval ( curl_getinfo ( $ post , CURLINFO_HTTP_CODE ) ) ) ; }
message with the specified URI, headers, and content.
message with the specified URI headers and content .