node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

replicate-http

replicate-http

Copy remote files with webdav protocol by urls.

npm install replicate-http

Usage

Note that destination must support webdav PUT method.

var replicate = require("replicate-http"),
    from      = "http://pewpewpew.com/passwords.txt",
    to        = "http://backup.pewpewpew.com/passwords.txt";
 
replicate(from, to, function(error) {
    if (error) {
        throw error;
    }
 
    console.log("File successfully copied!");
});
 

Authors