This is a WebDAV client.
It is not meant to be used on browsers yet.
Install
npm install webdav-client
Usage
// or// orconst webdavClient = ; // Create the client objectconst connection = 'http://my-webdav-server:1900'; connection
Methods
The Connection
options :
The ConnectionReaddirOptions
interface :
The ConnectionReaddirOptions
interface :
The ConnectionReaddirComplexResult
interface :
Streaming
If you want to perform a get
or put
in streaming mode, you can call the methods without a callback (and without the content argument for the put
).
const stream = connection;streamstream;
const stream = connection;stream;otherStream;
Custom requests
To do custom requests, you can use the request(...)
and stream(...)
methods.
They take a RequestOptions
argument.
Web browser compatibility
This library can be used in a web browser.
You can produce the web browser library from your from with, for instance, browserify
or you can use the "browserified" file itsef (located at lib/browserified.js
).
Here is the usage of the browserified.js
file :
<!-- Load the library --> <!-- Usage of the library -->
Keep in mind that the library uses the request
package, which might not be the most optimized package for web browsers.