src/HttpClient.php
protected static function execute($ch)
    {
        $content = curl_exec($ch);
        $result = new \stdClass;
        $result->body = trim($content);
        $result->responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        return $result;
    }
protected static function execute($ch)
    {
        $content = curl_exec($ch);
        $result = new \stdClass;
        $result->body = trim($content);
        $result->responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        return $result;
    }
protected static function execute ( $ ch ) { $ content = curl_exec ( $ ch ) ; $ result = new \ stdClass ; $ result -> body = trim ( $ content ) ; $ result -> responseCode = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; return $ result ; }
Executes HTTP request, parses response headers, leaves body as a string

Based on http://snipplr.com/view/17242/

@param resource $ch cURL handle

@return \stdClass Containing headers, body, responseCode properties
Executes HTTP request parses response headers leaves body as a string