[python-win32] win32com: HTTP Post with WebBrowser.Navigate()
Troy Farrell
troy at studyshare.net
Mon Aug 29 14:59:05 CEST 2005
>Try PostData=buffer(Data).
>
> hth
> Roger
Roger, this is exactly the solution I needed. Thanks!
For future reference, the working code is below:
---Begin Python Code---
import win32com.client
# Prepare Internet Explorer
ie = win32com.client.Dispatch( "InternetExplorer.Application.1" )
URL = "http://server/cgi-bin/test.sh"
Flags = 0
TargetFrame = ""
Data = "this=that&test=big%20success"
PostData = buffer( Data )
Headers = "Content-Type: application/x-www-form-urlencoded\r\n"
# show it to the user
ie.Visible = True
ie.Navigate( URL, Flags, TargetFrame, PostData, Headers )
---End Python Code---
More information about the Python-win32
mailing list