HTTP-DAV

 view release on metacpan or  search on metacpan

doc/html/HTTP-DAV.html  view on Meta::CPAN

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP::DAV - A WebDAV client library for Perl5</title>
<link rel="stylesheet" href="perldav_plain.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body>



<h1 id="NAME">NAME</h1>

<p>HTTP::DAV - A WebDAV client library for Perl5</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>   # DAV script that connects to a webserver, safely makes 
   # a new directory and uploads all html files in 
   # the /tmp directory.

   use HTTP::DAV;
  
   $d = HTTP::DAV-&gt;new();
   $url = &quot;http://host.org:8080/dav/&quot;;
 
   $d-&gt;credentials(
      -user  =&gt; &quot;pcollins&quot;,
      -pass  =&gt; &quot;mypass&quot;, 
      -url   =&gt; $url,
      -realm =&gt; &quot;DAV Realm&quot;
   );
 
   $d-&gt;open( -url =&gt; $url )
      or die(&quot;Couldn&#39;t open $url: &quot; .$d-&gt;message . &quot;\n&quot;);
 
   # Make a null lock on newdir
   $d-&gt;lock( -url =&gt; &quot;$url/newdir&quot;, -timeout =&gt; &quot;10m&quot; ) 
      or die &quot;Won&#39;t put unless I can lock for 10 minutes\n&quot;;

   # Make a new directory
   $d-&gt;mkcol( -url =&gt; &quot;$url/newdir&quot; )
      or die &quot;Couldn&#39;t make newdir at $url\n&quot;;
  
   # Upload multiple files to newdir.
   if ( $d-&gt;put( -local =&gt; &quot;/tmp/*.html&quot;, -url =&gt; $url ) ) {
      print &quot;successfully uploaded multiple files to $url\n&quot;;
   } else {
      print &quot;put failed: &quot; . $d-&gt;message . &quot;\n&quot;;
   }
  
   $d-&gt;unlock( -url =&gt; $url );</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>HTTP::DAV is a Perl API for interacting with and modifying content on webservers using the WebDAV protocol. Now you can LOCK, DELETE and PUT files and much more on a DAV-enabled webserver.</p>

<p>HTTP::DAV is part of the PerlDAV project hosted at http://www.webdav.org/perldav/ and has the following features:</p>



( run in 1.035 second using v1.01-cache-2.11-cpan-119454b85a5 )