Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import httplib, json
- h1 = httplib.HTTPConnection( 'theargentlark.com', 80 )
- headers = { "Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain" }
- params = { "user": "david", "type": "open_session" }
- h1.request( 'POST', '/dark-chess-ajax', json.dumps( params ), headers )
- r1 = h1.getresponse()
- print r1.status, r1.reason
- data = r1.read()
- print len( data ), data
Add Comment
Please, Sign In to add comment