protected static function processRequest($ch)
    {
        # Check for 429 leaky bucket error
        while(1) {
             $output = curl_exec($ch);
             self::$lastHttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
             if(self::$lastHttpCode != 429) {
                break; 
             } 
             usleep(500000);
        }
    
        if (curl_errno($ch)) {
            throw new Exception\CurlException(curl_errno($ch) . ' : ' . curl_error($ch));
        }

        // close curl resource to free up system resources
        curl_close($ch);

        return $output;
    }
protected static function processRequest($ch)
    {
        # Check for 429 leaky bucket error
        while(1) {
             $output = curl_exec($ch);
             self::$lastHttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
             if(self::$lastHttpCode != 429) {
                break; 
             } 
             usleep(500000);
        }
    
        if (curl_errno($ch)) {
            throw new Exception\CurlException(curl_errno($ch) . ' : ' . curl_error($ch));
        }

        // close curl resource to free up system resources
        curl_close($ch);

        return $output;
    }
protected static function processRequest ( $ ch ) { # Check for 429 leaky bucket error while ( 1 ) { $ output = curl_exec ( $ ch ) ; self :: $ lastHttpCode = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; if ( self :: $ lastHttpCode != 429 ) { break ; } usleep ( 500000 ) ; } if ( curl_errno ( $ ch ) ) { throw new Exception \ CurlException ( curl_errno ( $ ch ) . ' : ' . curl_error ( $ ch ) ) ; } // close curl resource to free up system resources curl_close ( $ ch ) ; return $ output ; }
Execute a request, release the resource and return output

@param resource $ch

@throws CurlException if curl request is failed with error

@return string
Execute a request release the resource and return output