set curlResource to NULL by default