A little hard to understand but having watched the video and looked at a few examples, I get an runtime exception when it tries to convert my file. Does the file have to be JSON which most of the example refer to?
It should work doing this (replace the URL with that of the file you want to get) :
Dim outputFile As Xojo.IO.FolderItem = Xojo.IO.SpecialFolder.Documents.Child("mylistofURLs.txt")
mySocket.Send("GET", "http://127.0.0.1:8080/GetData", outputFile)
Still no luck.
I added a Class (MyHTTPsocket) with the super ‘xojo.net.HTTPSocket’
I put the following in the Open event
Dim outputFile As Xojo.IO.FolderItem = Xojo.IO.SpecialFolder.Documents.Child(“mylistofURLs.txt”)
MyHTTPsocket.Send(“GET”, “http://www.sallyfitz.com/AppVideoClips.txt”, outputFile)
Error
There is more than one item with this name and it is not clear to which it refers
[quote=288679:@Martin Fitzgibbons]Error
There is more than one item with this name and it is not clear to which it refers[/quote]
That error is also thrown if there is no method of that name which matches that signature. When this error appears, what is highlighted?
[quote=288679:@Martin Fitzgibbons]Still no luck.
I added a Class (MyHTTPsocket) with the super ‘xojo.net.HTTPSocket’
I put the following in the Open event
Dim outputFile As Xojo.IO.FolderItem = Xojo.IO.SpecialFolder.Documents.Child(“mylistofURLs.txt”)
MyHTTPsocket.Send(“GET”, “http://www.sallyfitz.com/AppVideoClips.txt”, outputFile)
Error
There is more than one item with this name and it is not clear to which it refers[/quote]
Adding the class is not enough. You want to drag an instance of it onto the view.
Then use the instance, which most probably will be named myHTTPSocket1.
That said, I just tried, and mylistofURLs.txt ends up with mylistofURLs.txt created but empty (zero bytes). I tried to add a Safari user agent header, it does not do the trick.