A Common Lisp library for communicating with web services.
The RESTless library provides convenience functions for HTTP requests/responses, URI handling, JSON encoding/decoding, SOAP messages, RDF/XML parsing, integrated Windows authentication, OAuth 1.0a user authorization, OSLC clients, UPnP descriptions, and more.
Most web services use HTTP for data transfer. The RESTless library always uses the Drakma HTTP client for this task.
A popular data format for data exchange with web services is JSON. The RESTless library provides its own JSON decoder/encoder in the ‘rs-json’ package. The implementation is RFC 8259 compliant and has adequate performance. The default configuration is round-trip safe, i.e. you can read a JSON value and write it back without loss of information. The mapping between JSON values and Lisp data is as follows:
- JSON objects are represented as associated lists. This has two benefits compared to hash tables; there is a reader syntax and the printer shows the complete JSON object.
- JSON arrays are represented as vectors. Similar benefits as for objects and the element access is index based.
- JSON strings and numbers are Lisp strings and numbers respectively.
- The JSON values ‘true’, ‘false’, and ‘null’ are represented by the keywords ‘:true’, ‘:false’, and ‘:null’ respectively. This is due to the round-trip safety.
The other popular data format for data exchange with web services is XML. The RESTless library relies on Closure XML (CXML) and related packages for XML processing.
RDF/XML is the data exchange format for the semantic web. The CL-RDFXML library is based on Closure XML and thus fits well into the ecosystem of the RESTless library. RDF graphs are read into a Wilbur database and then you use Wilbur commands to query the data.
OSLC (Open Services for Lifecycle Collaboration) combines RDF/XML with OAuth 1.0a user authorization. Thus, everything said about RDF/XML also applies to OSLC.
SOAP (Simple Object Access Protocol) is a web API standard maintained by the W3C. SOAP uses XML as its message format.
UPnP (Universal Plug and Pray) is a set of networking protocols for consumer electronics. It is based on SOAP 1.1. The TR-064 protocol of AVM FRITZ!Box devices uses this technology.
- Drakma
- HTTP Client
- Cerberus
- Kerberos authentication
- North
- OAuth 1.0a
- PURI
- URI Library
- QURI
- URI Library
- Closure XML (CXML)
- XML Parser
- Plexippus XPath
- XPath 1.0
- CL-RDFXML
- RDF/XML Parser
- Wilbur
- Semantic Web Toolkit