WebDAV access with Scriptable Shortcut action

Can Scriptable read/write a file to/from a WebDAV server? If so, could someone provide a simple example that does that given the WebDAV url and the userid/password? My goal is to be able to use the Scriptable Shortcut action to access a WebDAV server. Thanks in advance.

As someone new to Scriptable, my question is really more general. Is it possible to make use of one of the JavaScript WebDAV clients (e.g., https://github.com/perry-mitchell/webdav-client) from Scriptable?

That example client requires node, which Scriptable doesn’t support. You could try packaging it with Browserify first.

Or maybe have a look at JSBox, which apparently has Node.js support?

Thanks for 2 great suggestions. If browserify let’s me run the WebDAV script in scriptable, called from Shortcuts with file name, path, and authentication as variables then that would do what I need.
JSbox also looks interesting and it has Shortcut actions which may accomplish the same thing. Also looks like a potentially useful app (albeit, not free).
General observation: it is interesting to me that there does not appear to be a WebDAV client app in the App Store that includes Shortcut actions. Even Apple’s Files app which can access Nextcloud (which is what I’m trying to do) has no Shortcut actions. Perhaps in iOS 14?

As another general observation, perhaps WebDAV is not a technology that’s currently taking great strides in terms of day-to-day use? That would explain the lack of client.

Just checking the Wikipedia page gives me a feeling that it isn’t really an active technology any more, but more one that’s maintained for backwards compatibility. Beyond maybe an occasional reference to CalDAV I see here and there, I just don’t see it mentioned with any notable frequency.

Of course, I may just be a victim of black swan assumption in this. Not encountering it myself does not mean it isn’t an active and vibrant technology, but I really haven’t seen much mention of it in the last decade.

I would say that it would be unusual to find a platform/system that supported something like WebDAV for file transfer that didn’t also support SFTP (or an SMB connection for more localised storage). As such something like SFTP is probably a wider platform denominator for access and might explain why you see more of those than you do iOS WebDAV client software?

The reason for wanting to use WebDAV is that it is what NextCloud uses for file access. I tried (naively) using browserify by simply running “browserify factory.js -o webclient.js” and got an error about not finding the module url-parse.