Search the Community
Showing results for tags 'ResponseStream'.
-
Not familiar with "winhttp.winhttprequest.5.1" Object, Ergo: Just experimenting a bit with it. When using the 'ResponseStream' option ... AutoIt crashes. - Anything I'm doing wrong (or missed) ? (or potential issue/bug) Don't know much about a 'IStream', other than that 'ResponseStream' is supposed to return a pointer to it. msdn: WinHttpRequest Object main() Func main() Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") Local $sType = 'GET' Local $sUrl = 'http://www.autoitscript.com/site/' Local $sData = '' ;; optional parm. _HTTPRequest($oHTTP, $sType, $sUrl, $sData) EndFunc Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "") ;; http://msdn.microsoft.com/en-us/library/aa384106 Local $iResult = 0 ;; debug $oHTTP.Open($oMethod, $oURL, False) ;; empty -> ok. $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5") ;; empty -> ok. If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") ;; empty -> ok. EndIf $oHTTP.Send($oData) ;; empty -> ok. ;~ ;; options: ResponseBody, ResponseStream, ResponseText, Status, StatusText ;~ $iResult = $oHTTP.StatusText ;; "OK" -> ok. ;~ $iResult = $oHTTP.Status ;; 200 -> ok. ;~ $iResult = $oHTTP.ResponseBody ;; binary(ResponseText) -> ok. ;~ $iResult = $oHTTP.ResponseText ;; html page/content -> ok. $iResult = $oHTTP.ResponseStream ;; crash with 3.3.6.1 & 3.3.7.14 (Win.Xp.32b) EndFunc
- 1 reply
-
- ResponseStream
- WinHttpRequest
-
(and 1 more)
Tagged with: