Skip to content

Instantly share code, notes, and snippets.

@abehmiel
Last active August 19, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abehmiel/80a1a3ef008095ce9b8b7c0efca6e2d6 to your computer and use it in GitHub Desktop.
Save abehmiel/80a1a3ef008095ce9b8b7c0efca6e2d6 to your computer and use it in GitHub Desktop.
Basic Python API request
import requests
headers = {"token": "API TOKEN"}
params = {"something": "SOMETHING"}
response = requests.get("https://www.something.com", headers=headers, params=params)
json_data = response.json()
status = response.status_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment