mars 2012 archives

WebDAV en Javascript

I wrote a small WebDAV javascript librairy based on the prototype framework. The API is simple : 12345678910var dav = new DAV(’http://someserver/’); var txt = dav.get(’somefile.txt’); dav.each(’/somedir/’, function(name, info) { console.log(name, info); }); txt += "\nModified"; dav.put(’somefile.txt’, txt); Of course, the Same Origin Policy may limit the sites you can reach. But it work perfectly …

Lire la suite