Category: Networking & HTTP tags: GetHttpRequests HTTP GET with requests GET a URL with the requests library and raise on non-2xx. Author: chris // Language: Python Download Print Copy Code Share import requests r = requests.get('https://api.github.com/zen', timeout=10) r.raise_for_status() print(r.text)