Update api.cpp

Switch to use HTTPS because http use has been discontinued.