Greets! It's another WebDav question! While the search results from the forum have been somewhat helpful, part of my misunderstanding is that my particular request doesn't follow the same format as those prior. In particular, I don't *think* I need to map or create a multipart json request. The application is webdav to a nextcloud/owncloud/generic webdav server - and I realize that I am not the first one to ask this type of question, however there don't seem to be any "here's a solution" responses to those. The posts simply died off. :-(
I have a functioning server and can access it via curl, such as:
a) create subfolder2 inside of user1's workspace, wherein username:password are credentials and --ssl-no-revoke fixes a curl issue:
curl -u username:password -X MKCOL https://server.tld/remote.php/dav/files/user1/subfolder2 --ssl-no-revoke
In raw, it transforms to this:
MKCOL /remote.php/dav/files/user1/subfolder2 HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Host: server.tld
(such that the auth is straight base64 encoded of the "username:password" credential, including the separator)
b) transfer a local file myphoto.png to that prior-created folder on the server:
curl -u username:password -T myphoto.png https://server.tld/remote.php/dav/files/user1/subfolder2/myphoto.png --ssl-no-revoke
In raw that looks like:
GET /remote.php/dav/files/user1/subfolder2/myphoto.png HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Host: server.tld
I have no idea why the -T (transfer) turns into a GET request when viewed in raw, perhaps that's just an anomaly from reqbin.com. Also, the --ssl-no-revoke flag, which is absolutely necessary, gets dropped off the raw. So raw probably isn't helping me any.
Where I am really lost is how does the above turn into an httpjob? How does -T or MKCOL become a type of request, or a header?
I've used httputils in quite simple processes (very straightforward GETs and POSTs) for a long time, but converting this to hand-written http requests has taxed my google-fu severely.
I'm hoping some of those that were doing prior work with webdav attempts might share some of their earlier successes or understanding?
Thanks,
Ted.