Jump to content
Sign in to follow this  

API Batch requests help!

Recommended Posts


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.


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

Global $oXML = ObjCreate("Microsoft.XMLHTTP")
$oXML.Open("GET", "", 0)

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)


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.