skleblan has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to learn how to use WebDAV with Perl. My main use-case is simply downloading several files and folders (I think the term is collections in DAV??). I'm using App::DAVThis to stand up a simple test server, and I'm trying to learn how to use HTTP::DAV but I'm having some issues getting it to work. I was hoping that after I got it working with dav_this (the name of the executable script), then I can move on to a production server that supports https.
I keep getting errors regarding Bad Requests. Does anyone know if I'm using the module correctly? The frustrating thing is that I can use cadaver to connect to the temp server and it works just fine.
Test Code
#!/usr/bin/env perl use strict; use warnings; use utf8; use HTTP::DAV; my $url = "http://localhost:4242/"; my $dav = HTTP::DAV->new; $dav->open(-url=>$url) or die $dav->message; $dav->get(-url=>"/", -to=>".");
Error message
Server response: Could not access http://localhost:4242/: Bad Request +at davtest.pl line 14.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems learning WebDAV with dav_this and HTTP::DAV
by haukex (Archbishop) on Oct 28, 2019 at 21:41 UTC | |
by skleblan (Sexton) on Oct 31, 2019 at 14:59 UTC |