A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[AutoIt] A nice AutoIt http wrapper I found

1.2k views · started by 323 ·
#1
[AutoIt] A nice AutoIt http wrapper I found
This is an extremely nice and simple http wrapper I found for AutoIt, and you can even set headers and all of that.

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
ConsoleWrite(_HTTPRequest($oHTTP, "GET", "http://google.com") & @CRLF)

Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "")
$oHTTP.Open($oMethod, $oURL, False)
If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.Send($oData)
Return $oHTTP.ResponseText
EndFunc


Credit goes to whoever wrote it, I have no idea who.
#2
Doc wrote this several years ago.

And I'd personally advise against the use of this. Simply ancient, inefficient legacy code.

Instead, here's an HTTP wrapper I wrote a while back. Just as simple (if not more simple), but more comprehensive. Also bundled with a few Gaia methods (working Gaia login, etc). Contains a few other snippets also.

If anyone needs any guidelines on how to use this (or any questions, comments, or concerns for that matter), post here.
#3
Doc wrote this several years ago.

And I'd personally advise against the use of this. Simply ancient, inefficient legacy code.

Instead, here's an HTTP wrapper I wrote a while back. Just as simple (if not more simple), but more comprehensive. Also bundled with a few Gaia methods (working Gaia login, etc). Contains a few other snippets also.

If anyone needs any guidelines on how to use this (or any questions, comments, or concerns for that matter), post here.


Wow thats awesome, thanks for posting it here. I'll play around with it a bit and like you said, if I have any questions I'll post :)