Added cURL wrapper function. Untested.