Download a File

Gunnar's Blog


In Dynamic NAV it is possible to use the Automation “‘Microsoft XML, v6.0′.XMLHTTP” to download files.  The code would be IF ISCLEAR(WinHTTP) THEN CREATE(WinHTTP,TRUE,FALSE);'GET',URL,FALSE); WinHTTP.send(''); IF WinHTTP.status <> 200 THEN ERROR(Text003,WinHTTP.status,WinHTTP.statusText); TempFile.CREATE(TempFileName); TempFile.CREATEOUTSTREAM(OutStr); InStr := WinHTTP.responseStream; COPYSTREAM(OutStr,InStr); TempFile.CLOSE; The … Continue reading

Read the complete post at

Posted 2011-3-7 18:12 by Gunnar's Blog