You can clone with HTTPS, SSH, or Subversion.
Download ZIPLoading…
if you remove the unnecessary constructors it gets a little bit simpler:
var dav = require('dav');
// use `dav.transport.Basic` by default if single argument & no `send()` method
var client = new dav.Client({
baseUrl: 'https://mail.mozilla.com',
credentials: {
username: 'xxx',
password: 'xxx'
}
});
var req = {
method: 'PUT',
data: 'BEGIN:VCALENDAR\nEND:VCALENDAR',
etag: '12345'
};
client.send(req, '/calendars/123.ics').then(response => {
// response instanceof XMLHttpRequest
});
Right now using the WebDAV bits looks like
This is quite verbose and I think there's room for some cleanup.