Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Grabbing web pages
Last updated at 11:06 am UTC on 19 February 2019
You can always "inspect" this (or tack an "inspect" on the end of the chain) to peek at the contents.
'http://www.squeak.org/' asUrl retrieveContents.
I often pop the content of the retrieved page into the clipboard:
Clipboard clipboardText: 'http://www.squeak.org/' asUrl retrieveContents content.
Purpose: fetches a given page and displays it in its own window.
HTTPSocket httpShowPage: 'http://www.cc.gatech.edu/fac/mark.guzdial/squeak/'
Purpose: Fetches a given image and displays it in its own window.
HTTPSocket httpShowGif: 'http://www.cc.gatech.edu/fac/mark.guzdial/squeak/images/sqlogo.gif'
Purpose: Downloads the document referenced by a URL and returns a MIMEDocument. MIMEDocuments can then be queried for their MIME contentType and for their binary content.
'http://minnow.cc.gatech.edu/files/squeak/squeak.gif' asUrl retrieveContents