Open Source Common Lisp Software

S-HTTP-CLIENT

A Basic HTTP Client

S-HTTP-CLIENT is basic implementation of a Common Lisp HTTP Client. This simple package is used as a building block in a number of other open source projects, as can be seen from this description of some other Open Source Common Lisp packages.

Contents

Features

S-HTTP-CLIENT can:

Status

S-HTTP-CLIENT is considered stable code.

News

Platforms

S-HTTP-CLIENT is written in ANSI standard Common Lisp and should be portable across any CL implementation, provided parts of S-SYSDEPS are ported.

Downloading

You can download the latested released tarball of the S-HTTP-CLIENT package from http://homepage.mac.com/svc/s-http-client/s-http-client.tar.gz. This archive is signed on release by Sven Van Caekenberghe, whose public key is published at http://homepage.mac.com/svc/sven-public-ascii.gpg, the signature is in http://homepage.mac.com/svc/s-http-client/s-http-client.tar.gz.asc.

Alternatively you can access the DARCS repository at http://www.beta9.be/darcs/s-base64. For a good description on how to use DARCS see http://dirkgerrits.com/programming/erlisp/download/.

$ darcs get http://www.beta9.be/darcs/s-http-client
Example of basic darcs usage, get everything once and keep up to date by pulling in changes

Installation

The S-HTTP-CLIENT package is loaded using ASDF. There is an excellent tutorial on ASDF to get you started. Alternatively you can use ASDF-INSTALL. There is an great tutorial on ASDF-INSTALL to get you on the way.

CL-USER 1 > (asdf:oos 'asdf:load-op :s-http-client)
Example of setting up and using ASDF to compile and load the package

Usage

Just call DO-HTTP-REQUEST with the necessary arguments. For example:

CL-USER 1 > (in-package :s-http-client)
#<The S-HTTP-CLIENT package, 59/128 internal, 5/16 external>

S-HTTP-CLIENT 2 > (s-http-client:do-http-request "http://homepage.mac.com/svc/s-http-client/foo.html")
"<html>
<head><title>Foo</title></head>
<body>
<h1>Foo</h1>
<p>Just a test page.</p>
</body>
</html>
"
200
((:DATE . "Sat, 19 Nov 2005 22:05:38 GMT") 
 (:CONTENT-LENGTH . "100") 
 (:CONTENT-TYPE . "text/html") 
 (:CACHE-CONTROL . "public") 
 (:X-RESPONDING-SERVER . "webdav11") 
 (:SERVER . "AppleDotMacServer") 
 (:ETAG . "14djc8on-8nlp-j19yhvvj5-c37cvzcpi0") 
 (:LAST-MODIFIED . "Sat, 19 Nov 2005 22:02:31 GMT") 
 (:VIA . "1.1 netcache02 (NetCache NetApp/5.5R6)"))
#<URI http://homepage.mac.com:80/svc/s-http-client/foo.html>
:NEW
Example DO-HTTP-REQUEST Usage

In principle, any HTTP verb is allowed. It is the easiest to specify them as keywords. In the case of :POST or :PUT, content as well as a content-type should be specified (content length will be calculated). Content can be specified as a string or byte sequence as far as write-sequence can be called on your platforms TCP/IP stream. Basic authorization is to be specified as (username . password) strings.

Connections are kept alive and reused as long as the same host and port are accessed using the same scheme. Both HTTP/1.0 with Keep-Alive headers as well as HTTP/1.1 is supported. Chunked transfer encoding is also implemented.

API Reference

There is automatically generated API Reference documentation available for the S-HTTP-CLIENT package.

Mailinglist

There is no mailing list for this project.

Changelog

Release Notes:

TODO

FAQ

Nothing appropriate.

Bugs

Authors

S-HTTP-CLIENT was written by Sven Van Caekenberghe.

Maintainers

S-HTTP-CLIENT is being maintained by Sven Van Caekenberghe.

License

You are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser General Public License (http://opensource.franz.com/preamble.html), also known as the LLGPL.

History

This is a new project.

References

Thera are no references.