This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Using Http Authentication with VisualWorks
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
I recently (in 3.1) got Http authentication working in BottomFeeder. I didn't have to do anything out of the oridinary - all the support I need was already in the NetClients package, which has been part of the VW distribution for a few years now. So how do you add such support? Well, let's say you issue an Http request:
Now, once you have that authorization information, what do you do? Well, you create the request again, this time with the authorization information in it, then re-issue the request. Something like this:
That should do it. Now, of course, you'll want to catch exceptions, and handle other cases (movement of a page, various error responses, etc.). To get an idea of how to do that sort of thing, load the package Http-Access from the Public Store. The package handles authentication, moved pages, and mod-gzip automatically. I use it in BottomFeeder and my blog posting tools - it's getting real world use.