Note: This is taken from the Chicken Wiki, where a more recent version could be available.
The webdav-client library contains client-side routines for distributed authoring (RFC 2518).
Every WebDAV client procedure in this library takes a PATH argument, which can be a string that contains the resource URL, or a list of the form (AUTH PATH), where AUTH is a procedure of the form LAMBDA TYPE * REALM -> (USER PASS) that takes in HTTP authentication type and realm, and returns user name and password for the realm, and PATH is again the resource URL.
Executes a OPTIONS request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a GET request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a PUT request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a DELETE request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a COPY request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body. Argument TO-PATH must be a string.
Executes a MOVE request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body. Argument TO-PATH must be a string.
Executes a PROPFIND request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a REPORT request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a PROPPATCH request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes a LOCK request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
Executes an UNLOCK request and invokes procedure HANDLER with the server response. The default handler returns an alist with the HTTP response status, headers, and body.
(use webdav-client)
;; retrieve all properties of given resource (webdav:propfind (list (lambda (type realm) (list "user" "pass")) ;; authentication information "http://localhost/file" ;; resource URL ))
;; PROPPATCH example from RFC 2518 (webdav:proppatch (list (lambda (type realm) (list "user" "pass")) "http://localhost/file" `((Z "http://www.w3.com/standards/z39.50/")) ;; property namespaces `((Z:authors (Z:Author "Jim Whitehead") (Z:Author "Roy Fielding"))) ;; properties to set `((Z:Copyright-Owner)) ;; properties to delete ))
Ivan Raikov
Copyright 2008 Ivan Raikov.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.