Jump to content

Http problem


Recommended Posts

10 hours ago, haijie1223 said:

after 3.3.14.0 version,the error is exist。bug?

The bug appears to be in your code snippet.  I seriously doubt that prior to 3.3.14.0 you would not have gotten the same error.  Your Open method requests Async mode.  If you change it to Synchronous mode, it works just fine.

Global $oHttp = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHttp.Open("GET", "https://www.google.com", False)
$oHttp.Send()
ConsoleWrite(BinaryToString($oHttp.ResponseBody, 4))

 

Edited by TheXman
Link to comment
Share on other sites

22 hours ago, TheXman said:

该错误似乎在您的代码片段中。我严重怀疑在3.3.14.0之前你不会得到同样的错误。您的Open方法请求异步模式。如果将其更改为同步模式,则工作正常。

全局  $ oHttp  =  ObjCreate(“WinHttp.WinHttpRequest.5.1” )
$ oHttp 。打开(“GET” , “https://www.google.com” , False$ oHttp 。发送()
ConsoleWriteBinaryToString$ oHttp 。ResponseBody , 4 ))

 

 

1 hour ago, Zedna said:

据我所知,ResponseBody属性不是函数,所以你必须使用ResponseBody而不是错误的ResponseBody()

Thanks!It's My Careless。

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...