Thread:Project:Support desk/Update Wiki pages with C

Hi,

Has anyone ever tried updating a Wiki site using WebRequest/WebResponse/WebClient in C#? I didn't get too far yet for testing, facing some security issues, but I was wondering if I'm on the right track at all. Here is how I imagine a login could work with C# (again, due to security issues which I am confident to solve, I could not test this yet):

string loginUrl = "http://mytestwiki/api.php?action=login";

using (var webClient = new WebClient) {   var data = new NameValueCollection; data["lgname"] = "user"; data["lgpassword"] = "password"; byte[] response = webClient.UploadValues(loginUrl, data); }

Assume the function itself would work properly, what exactly would I get back in my response? Can I retrieve all the required information from it? (cookie, token, ...)