deltree
Cannot reach external API with simple flask app
yes, i added some simple code to ping the api:
@app.route('/section2/test_api')
def test_api():
response = requests.get('https://api.binance.com/api/v3/ping')
if response.status_code == 200:
return "API is reachable", 200
else:
return "Error reaching API", response.status_code
When run locally i get this: API is reachable
When run on railway i get this: Error reaching API
10 replies