wd_connect: Establishes a connection to a WebDAV server

View source: R/webdav.R

wd_connectR Documentation

Establishes a connection to a WebDAV server

Description

Creates and authenticate a request handle to the WebDAV server

Usage

wd_connect(url, username, password = NULL)

Arguments

url

url of the WebDAV directory

username

username

password

password - if not given, you will be asked for it

Details

Notice: it's not recommended to write the password as plain text. Either omit the parameter (then you will be asked to enter a password interactively) or use for example the system credential store via keyring package.

Value

a httr2 request to the WebDAV server location

Examples

## Not run: 
# establish a connection, you will be asked for a password

r <- wd_connect("https://example.com/remote.php/webdav/","exampleuser")


# establish a connection, use keyring package to retrieve the password

keyring::key_set("mydav", "exampleuser") # call only once

r <- wd_connect("https://example.com/remote.php/webdav/",
                "exampleuser"
                keyring::key_get("mydav", "exampleuser"))

## End(Not run)

rdav documentation built on Oct. 15, 2025, 3 p.m.