Cannot download file from url in LotusScript

hello,have a big problem, I cannot download binary file from web using LotusSript

now I use Microsoft.XMLHTTP object, it downloads the file, but it is rather big (about 2Mb) and when I try

objXMLHTTP.ResponseBody

I see error “Array size exceeded maximum limit”

I want to download and save the file, may be I use not correct objects for that, can smb help?

here is my code:

Set objXMLHTTP = CreateObject(“Microsoft.XMLHTTP”)

objXMLHTTP.open “GET”, “http://www.web.site/file.bin”, False

objXMLHTTP.send

Set objResponse = CreateObject(“ADODB.Stream”)

objResponse.open

objResponse.type = 1 ’ binary

ERROR HERE → objResponse.write objXMLHTTP.ResponseBody

Subject: Cannot download file from url in LotusScript

Is it possible to read whatever is returned in smaller bits instead of one swoop that appears to possible exceed limitiation? You can place into a NotesStream object likely and then work with the file.

Subject: RE: Cannot download file from url in LotusScript

do you know method how to read in Lotus from objXMLHTTP by small N bytes? I tried to read from objXMLHTTP.responseStreamiRead = objRespStream.read(buffer, iToRead, iRead)

, but it returned error “Variant does not contain an object”

Can somebody give example of code how to download binary file from http url? and save it to file