Best way to http python get json data? Need help with requests! or How to http python get json data e

22 Replies, 1239 Views

Bro, your code looks fine for basic http python get json data. But timeouts? Might be the API’s fault.

Try adding a timeout param:
```python
response = requests.get('https://api.example.com/data', timeout=10)
```

Also, `print(response.status_code)` first to see if it’s even connecting.

Messages In This Thread



Users browsing this thread: 1 Guest(s)