NAME
HTTP::DAV::Nginx - Client library for Nginx WebDAV server
SYNOPSIS
use HTTP::DAV::Nginx;
$dav = HTTP::DAV::Nginx -> new('http://host.org:8080/dav/');
or
$dav = HTTP::DAV::Nginx -> new('http://host.org:8080/dav/', die_on_errors => 1);
unless ($dav -> mkcol('/test'))
{
print "ERROR:" . $dav -> err;
}
$dav -> put('/test/123', data => 'Hello');
$dav -> copy('/test/123', '/test2/12345');
$dav -> move('/test/123', '/test3/123456');
$dav -> delete('/test2/12345');
$ua = $dav -> useragent;
DESCRIPTION
NGINX "supports" WebDAV by means of a module, but this support is incomplete: it only handles the WebDAV methods PUT, DELETE, MKCOL, COPY, and MOVE, and leaves the necessary OPTIONS and PROPFIND (and the optional LOCK, UNLOCK, and PROPPATCH) methods unimplemented.
This module doesn't uses PROPFIND and OPTIONS commands for work.
METHODS
new - Constructor
Create a new HTTP::DAV::Nginx object;
my $dav = HTTP::DAV::Nginx -> new('http://host.org:8080/dav/');
or
HTTP::DAV::Nginx -> new('http://host.org:8080/dav/', die_on_errors => 1);
mkcol(uri) - creates a new dir at the location specified by the URI
copy(src_uri, dest_uri) - creates a duplicate of the source resource identified by URI
src_uri - source URI
dest_uri - destination URI
move(src_uri, dest_uri) - used to move a resource to the location specified by a URI
src_uri - source URI
dest_uri - destination URI
put(uri, data_type => data) - used to put data in a new resource specified by a URI
$dav -> put('/uri', data => 'Hello');
or
$dav -> put('/uri', file => '/etc/passwd');
or
$dav -> put('/uri', fh => $fh);
data_type - type of data:
data - scalar data
file - filename
fh - filehandle
data - scalar data or filename or filehandle
delete(uri, ...) deletes a resource at the specified
useragent - return LWP::UserAgent object for custom options (i.e. proxy, cookie etc)
err - return last error string
SEE ALSO
LWP::UserAgent
AUTHOR
Dmitry Kosenkov, <d.kosenkov@rambler-co.ru<gt>, <junker@front.ru<gt>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Dmitry Kosenkov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.1 or, at your option, any later version of Perl 5 you may have available.