Skip to content

Instantly share code, notes, and snippets.

@ant-rod-silva
Created September 17, 2018 18:44
Show Gist options
  • Save ant-rod-silva/1e88a9fe67211d90f3fa1f91f35b1a3b to your computer and use it in GitHub Desktop.
Save ant-rod-silva/1e88a9fe67211d90f3fa1f91f35b1a3b to your computer and use it in GitHub Desktop.
# pip install requests
import requests
payload = {'api_key': 'HasHCr1aDoAleat0r1amente'}
url = 'http://127.0.0.1:8000/api/country/1'
r = requests.get(url, params=payload)
print(r.url)
print(r.text)
print(r.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment