Jump to content

Problem with ObjCreate("winhttp.winhttprequest.5.1")


 Share

Recommended Posts

Hi there,

I'm trying to send a simple get request by ObjCreate("winhttp.winhttprequest.5.1")

But it can only work on some computer, and it can't send request on other computer.

I guess the problem is some computer have the different version of winhttp request (not 5.1, higher or lower)

Can I send a get request without using winhttp?

Thanks for your help!

Link to comment
Share on other sites

  • Moderators

@thang0408 how about posting your code, so we can actually see what you're attempting to do? Otherwise you're asking us to guess.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

@JLogan3o13: This is my code:

Func SendLog($Program,$Action)
    $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    $oHTTP.Open("Post", "https://docs.google.com/forms/d/1CS8PWFomyKympdI_RYLgjDdS35GwJXJAdpKnmdfxxxx/formResponse", False)
    $oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
    $SendString = 'entry.130629059=' & @UserName & '&entry.1530935491=' &$Program &'&entry.1571651137=' & $Action
    $oHTTP.Send($sendString)
    $oHTTP.Close
EndFunc

I use it to fill in an google form.

I'm now looking for a method without using winhttprequest 5.1

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

×
×
  • Create New...