Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.fatPages.getHttp
on getHttp (url, adr=nil) { <<Changes <<4/8/02; 12:55:16 PM by DW <<Created. Load a fatpage file over HTTP. <<If the address is not supplied, load the object into the address specified in the fatpage file; if it is specified, load it into that location. <<I found I was writing this code over and over. Paving a cowpath. local (s = tcp.httpReadUrl (url)); local (atts); if not fatPages.getPageAtts (@s, @atts) { fatPages.noObjectError (f)}; if not defined (atts.pageData) { fatPages.noObjectError (url:url)}; if adr == nil { adr = atts.adrPageData}; fatPages.unpackOdbObject (@atts, adr, flEdit:false); return (adr)} <<bundle //test code <<getHttp ("http://nyt.weblogs.com/homepage.fttb", @scratchpad.nytHeadlines)
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.