I just started using MSXML2.XMLHTTP object with VBA and I'm trying to interact with our Content Server (create, move, copy, delete files).
I found some random working code on the internet but I still do not fully understand what is going on.
Set req As New MSXML2.XMLHTTP
req.Open "MKCOL", "https://company/dav/nodes/" & URIsource & "/" & Encoded_FolderName, False
req.SetRequestHeader "Content-Type", "text/xml"
req.Send
URIsource is an objID from the server (ie : 12345678)
Encoded_Foldername is the folder name passed into this a function called URLEncode found here
From the OpenText website I tought I was supposed to put :
req.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
But it doesn't work with my code. I must use the previous one.
I also have a function to copy a file and it uses :
req.setRequestHeader "Destination", strDestURL
How am I supposed to know what Requestheader to use? Is there a list somewhere for post, put, get, etc. ? I understood that "Content-Type" is used to make sure the server understands the request but that's it.
Thank you