Throw exception if curl call fails
Add environment arg to setCredentials to disable ssl verfification