How do I download a document from the web?


First, make sure the NetClients package is loaded. You can use this Smalltalk code:

PackageLoader fileInPackage: 'NetClients'

Alternatively, you can create a separate image that preloads the package (that's explained in another FAQ).

Once you have the package loaded, you can open a FileStream on a remote URL just like you would do for a local file:

(FileStream open: '' mode: FileStream read) contents

User login