|Author: Dan Vanderkam
Download: The RB bbq, Realbasic café (Hotline)
An HTTP socket is the core of any web browser, it's what the whole application is built on. That's what httpSocket provides, an application core for writing an entire web browser in REALbasic. Once combined with a fully features HTML parser, it could prove very powerful.
What httpSocket does is very simple. It delivers data from an HTTP server in a very easy to use fashion, as well as providing some of the headers in the http protocal, such as Content Type. The data is delivered in three different manners. First of all, it can return the content of the requested file in a string; this feature could be used to retrieve the web page itself. Second, it will return images as picture objects, which can then easily be drawn onto canvases in the application. Last but not least, httpSocket also provides the option of downloading files to disk, at a specified location. With proxy support recently added, httpSocket does it's job well, which is to simplify the building of a web browser in REALbasic.
One thing httpSocket does not do is respond to some of the standard calls of the HTTP protocal, such as Redirection. While playing around with it, I decided to bring up my little web page. I made the mistake of not including a "/" at the end of the location, (it was a directory), and received a page titled "Redirection," with "Any modern browser will automatically handle a redirection for you. If you are reading this page, you should upgrade" in the body of the page. I'm not a master of the http protocal myself, and almost fainted when I saw the size of the HTTP 1.1 RFC (#2068), a whopping 369k of plain text. After recovering from shock, I decided to leave it at this, without enlightening myself on all of the details of the http protocal. That's what httpSocket is supposed to do, anyway, relieve us from having to read how ever many pages that comes out to of boring documentation.
Although not fully featured yet, httpSocket has hope for the future, when more support for the HTTP protocal is added.
| Pros: Provides easy to use access to the web in REALbasic, delivers
data in an easy to use format.
Cons: Doesn't respond to some calls of the standard HTTP protocal.