Skip to content

Instantly share code, notes, and snippets.

@applenob
Forked from abehmiel/API_request.py
Created August 19, 2019 08:30
Show Gist options
  • Save applenob/8e2eff843ff0bcc71c87fa8731cac489 to your computer and use it in GitHub Desktop.
Save applenob/8e2eff843ff0bcc71c87fa8731cac489 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