Skip to content

Instantly share code, notes, and snippets.

@rafen
Created April 8, 2014 15:43
Show Gist options
  • Save rafen/10145434 to your computer and use it in GitHub Desktop.
Save rafen/10145434 to your computer and use it in GitHub Desktop.
import json
import requests
user_id = 9617855
host = 'http://mc.dev.nationalgeographic.com:8000'
url = host + '/user/%s/app_registration/' % user_id
data = {'name': 'YourShot'}
headers = {
'X-MMDB-ApiKey': 'MMDB_DEBUG_KEY',
'X-MMDB-ApiUser': 'memcen_debug',
'Content-Type': 'application/json',
}
response = requests.post(url, data=json.dumps(data), headers=headers)
content = json.loads(response.content)
print content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment