Sign in to follow this  
Followers 0
Geethu

$oHTTP error

4 posts in this topic

When I use the code :

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $requestUrl, False)
$oHTTP.Send()
If $oHTTP.Status = 200 Then
Return $oHTTP.ResponseText
EndIf
 
I got an error. "Variable used without being declared."
 
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
^ ERROR

I don't know what's wrong with this..

Share this post


Link to post
Share on other sites



Does it work if you declare the variable by adding the "Local" keyword at the beginning of the line.

Share this post


Link to post
Share on other sites

There is nothing wrong with the code you posted. What could be a problem is that's not the whole code you run and the part that you haven't posted has MustDeclareVars option activated.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

There is nothing wrong with the code you posted. What could be a problem is that's not the whole code you run and the part that you haven't posted has MustDeclareVars option activated.

Thank you very much trancexx.

Its working fine.

Share this post


Link to post
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
Sign in to follow this  
Followers 0