Skip to content

Instantly share code, notes, and snippets.

@gnunicorn
Last active October 16, 2016 11:40
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 gnunicorn/f475b1672aa8946f143640224b242214 to your computer and use it in GitHub Desktop.
Save gnunicorn/f475b1672aa8946f143640224b242214 to your computer and use it in GitHub Desktop.
import requests
from requests.auth import HTTPDigestAuth
import json
url = 'http://localhost:8100/auth'
#url = 'http://api.safenet/auth'
payload = {
"app": {
"name": "Testing",
"id": "blah",
"version": "0.0.1",
"vendor": "blahha"
},
"permissions": [
"SAFE_DRIVE_ACCESS"
]
}
response = requests.post(url,
data=json.dumps(payload),
headers={'content-type': 'application/json'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment