Guest User

Untitled

a guest
May 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import httplib, json
  2. h1 = httplib.HTTPConnection( 'theargentlark.com', 80 )
  3. headers = { "Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain" }
  4. params = { "user": "david", "type": "open_session" }
  5. h1.request( 'POST', '/dark-chess-ajax', json.dumps( params ), headers )
  6. r1 = h1.getresponse()
  7. print r1.status, r1.reason
  8. data = r1.read()
  9. print len( data ), data
Add Comment
Please, Sign In to add comment