Created
January 11, 2013 19:32
-
-
Save srgist/4513313 to your computer and use it in GitHub Desktop.
PY:URLFetch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form_fields = json.dumps({ | |
"consumer_key": "10919-c09bc8099013395a6bf878ac", | |
"redirect_uri": "http://saurabh.com", | |
"email_address": "Albert.Johnson@example.com" | |
}) | |
url="https://getpocket.com/v3/oauth/request" | |
#form_data = urllib.urlencode(form_fields) | |
result = urlfetch.fetch(url=url, | |
payload=form_fields, | |
method=urlfetch.POST, | |
headers={'Content-Type': 'application/json; charset=UTF-8','X-Accept': 'application/json'}) | |
jsondata = json.loads(result.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment