A Common Lisp HTTP Client
S-HTTP-CLIENT is a 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.
- access any URL over HTTP/HTTPS using any HTTP verb
- support connection reuse
- support basic authentication
S-HTTP-CLIENT is considered stable code.
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.
S-HTTP-CLIENT package is loaded using ASDF. There is an excellent tutorial on ASDF to get you started.
CL-USER 1 > (asdf:oos 'asdf:load-op :s-http-client)
Example of setting up and using ASDF to compile and load the package
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>
((: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)"))
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.
There is automatically generated in documentation available for the
S-HTTP-CLIENT package in
There is no mailing list for this project.
- release 1: moved
S-HTTP-CLIENT into a seperate project under a new structure
- Proxy support is currently not implemented, although it is not really hard.
- HTTPS in only implemented on LispWorks (where it was really easy).
S-HTTP-CLIENT was written by Sven Van Caekenberghe.
S-HTTP-CLIENT is being maintained by Sven Van Caekenberghe.
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.
This is a new project.
There are no references.
Copyright © 2005 Sven Van Caekenberghe, Beta Nine BVBA. All Right Reserved.