Sign in to follow this  
Followers 0
gurucguzman

API Batch requests help!

2 posts in this topic

Hello Guys,

I'm a newbee using AutoIt application. Can you guys help me get the correct code to send a request using a batch file to an API server? I have been able to get this using the WGET using this code:

wget --no-check-certificate --http-user=USERNAME --http-password=PASSWORD --header="Content-Type: text/xml" --post-file=FILE.bat https://IP_ADDRESS/xml -O Response.xml

I need to be able to get something similar to this. I was told once that AutoIt has the WGET feature in it.

Please Help!!!!!

Share this post


Link to post
Share on other sites



Looking here on the forum I was able to find a good code using XML. But I'm still having problems retrieving the information from the being sent using and XML file. Please help me get a response back in XML.

Thanks!!!!

#include <_XMLDomWrapper.au3>
#include <File.au3>

Global $oXML = ObjCreate("Microsoft.XMLHTTP")
$oXML.Open("GET", "https://192.168.1.70/xml", 0)
;$oXML.Send

Global $sFile = _TempFile(@TempDir, '~', 'C:\GnuWin32\bin\response1010.xml')
FileWrite($sFile, $oXML.responseText)

If _XMLFileOpen($sFile) Then
    Local $aRet = _XMLGetChildNodes('//*')
    If Not @error Then
        For $i = 1 To $aRet[0]
            ConsoleWrite($aRet[$i] & @LF)
        Next
    EndIf
EndIf

FileDelete($sFile)

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