Uploading to a Webdav folder

I’m working on a private project, that will upload .json files from an iOS app to a folder on the website (hosted by DreamHost). I set up a Webdav folder and can log in from my iMac and after entering username and password, I can copy files to this folder. So it is set up properly for that.

But now I’m trying to do the same thing in code. I’m using Alamofire, and although it says it works (I get a status code 200), it is not actually sending anything to the folder.

My question here is… is anyone sending things to a webdav folder in any sort of code? The folder I’m sending it to is completely empty. Is there some sort of file needed inside the folder to send it to?

Yes, I’m in way over my head. I actually have this working with no webdav folder and using .php, but no login / password is needed. So anyone can send a file to the folder. That is bad, so I’d like to do it properly. Someone suggested Webdav, but I can’t seem to get it to upload files (after over a weeks worth of trial and error).