[Lazarus] HTTP client/server components committed.
Lee Jenkins
lee at datatrakpos.com
Sun May 15 23:05:32 CEST 2011
On 5/15/2011 12:13 PM, Michael Van Canneyt wrote:
>
> Hi,
>
> In the light of recent fppkg and fcl-web discussions:
>
> I've committed simple HTTP server (threaded or not) and HTTP Client components
> to FCL-Web. They work using the fcl-net ssockets unit. (for which a fix has been
> committed as well). Both use blocking sockets.
>
> The server component is integrated in the rest of fcl-web, the client is rather
> stand-alone.
> Both are designed to be easily extensible.
>
> There are examples of how to use both. The server example for instance allows
> files to be served and will properly report a 404 when a file is not found.
>
> To do this, I committed a fpmimetypes unit to fcl-base, so the server can
> correctly determine the mime type of a file.
> It can read the contents of a mime.types file as found on unix.
>
> if someone knows where this file can be found (or related information) on a
> Windows OS, please let me know.
>
> This is an initial implementation. Known to-dos:
> Client:
> * Maybe add proxy support ?
> * Easy access methods for POST/DELETE etc. commands.
> (currently only Get exists as a method, the rest can easily be done with
> HTTPMethod)
>
> Server:
> * Create a TWebHandler and THTTPWebApplication for use as a Lazarus project.
>
> Comments and suggestions welcome. Please report bugs in the bugtracker.
>
> Michael.
>
Great stuff Michael. I can see many uses for the HTTPClient alone without
having to use a third libraries.
Any idea when THTTPWehHandler/THTTPWebApplication objects will be included? I
imagine its a bit of work. It would make development of fpweb applications a
lot easier and more convenient though. I'm still trying to wrap my head around
the innards of fpweb unfortunately.
--
Warm Regards,
Lee
More information about the Lazarus
mailing list