Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib import parse, request
- params = parse.urlencode({'@number': 12524, '@type': 'issue', '@action': 'show'})
- headers = {"Content-type": "application/x-www-form-urlencoded",
- "Accept": "text/plain"}
- req = request.Request("http://bugs.python.org", params.encode('ascii'), headers)
- response = request.urlopen(req)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement