How to use python urllib2 to send json data for login -
i want use python urllib2 simulate login action, use fiddler catch packets , got login action ajax request , username , password sent json data, have no idea how use urllib2 send json data, help...
import urllib2 import json # whatever structure need send goes here: jdata = json.dumps({"username":"...", "password":"..."}) urllib2.urlopen("http://www.example.com/", jdata) this assumes you're using http post send simple json object username , password.
Comments
Post a Comment