php-echonest-api icon indicating copy to clipboard operation
php-echonest-api copied to clipboard

Use output buffering in "curl"-lib of your code

Open eerrap opened this issue 14 years ago • 2 comments

Use output buffering in "protected function doCurlCall" in file curl.php to prevent instant output which is not necessary because of return values available! If this is changed, a developer can decide whether to output the row response from echonest or to process it any further.

eerrap avatar Jun 25 '11 14:06 eerrap

May be better not change "curl.php" but change "HttpClient.php" to have the following lines in "request" method:

        ob_start();
        $this->doRequest($url, $parameters, $httpMethod, $options);
        $response = ob_get_contents();
        ob_end_clean();

eerrap avatar Jun 25 '11 14:06 eerrap

I've added the raw option on all API objects (see the bottom of the README for more info). Will this accomplish what you're looking for here?

bshaffer avatar Aug 02 '11 20:08 bshaffer