Skip to content

Instantly share code, notes, and snippets.

@bgweber
Created April 5, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgweber/3963caf976901b28f7d73579b1af8976 to your computer and use it in GitHub Desktop.
Save bgweber/3963caf976901b28f7d73579b1af8976 to your computer and use it in GitHub Desktop.
import requests
headers = { 'Authorization' : 'Token 1234567890abcdefg' }
result = requests.post("http://localhost:8000", headers=headers, \
json = { 'G1':'1', 'G2':'0', 'G3':'0', 'G4':'0', 'G5':'0', \
'G6':'0', 'G7':'0', 'G8':'0', 'G9':'0', 'G10':'0'})
print(result)
print(result.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment