Wrapper around cURL for simpler REST API communication