Fixed CURL API request for Python 3