Hi, I new using python + webkit.
I need make a POST request with webkit, but I dont know how to it.
I have this example with urllib:
#!/usr/bin/python
import urllib2, urllib
import httplib
server = 'server.somesite.com'
data = {'name' : 'shakaran', 'password' : 'Only_I_know'}
d = urllib.urlencode(data)
headers = {"Content-type": "application/x-www-form-
urlencoded",
"Accept": "text/plain"}
conn = httplib.HTTPConnection(server)
conn.request("POST", "/login.php", d, headers)
response = conn.getresponse()
if response.status == 200:
print response.status, response.reason
print response.getheaders()
data = response.read()
print data
conn.close()
I need a simple example with webkit. I look in the documentation for
Webkit.HTTPRequest
http://www.webwareforpython.org/WebKit/Docs/Source/Docs/WebKit.HTTPRequest.html
I try with webkit.NetworkRequest() but I don't know how to it.
Some help? Thanks
--
Blog: www.shakaran.net
Tivion: a simple streaming player for TV, Radio and Sopcast
www.shakaran.net/blog/tivion
My RPG: www.apogeus.es & www.apogeus.es/ao
Hosting: www.quijost.com
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/