Create apiCall

Function to automatically make the decision to use RCurl when the GnuTLS recv error is produced.