Maybe I'm trying to do something impossible or very difficult, but I still wanted to try. I was working on writing a program that can automatically reduce stack overflow entries for me.
So, my logical first step was to find out what happened behind the scenes when I pressed the downvote button. I used the HTTP network analyzer to find out how the browser interacts with the server I want to use. This is what he showed me.

Then I decided that I had to roll it off remotely if I wrote a C # program that would send an HTTP request identical to the one I sent when I clicked the downvote button. So I came up with this:
WebRequest req = WebRequest.Create("http://stackoverflow.com/posts/3905734/vote/3"); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = 37; req.Headers.Add("Request", "POST /posts/3905734/vote/3 HTTP/1.1"); req.Headers.Add("Accept", "application/json, text/javascript, */*; q=0.01"); req.Headers.Add("X-Requested-With", "XMLHttpRequest"); req.Headers.Add("Referer", "http://stackoverflow.com/questions/3905734/how-to-send-100-000-emails-weekly"); req.Headers.Add("Accept-Language", "en-us"); req.Headers.Add("Accept-Encoding", "gzip, deflate"); req.Headers.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MAAU)"); req.Headers.Add("Host", "stackoverflow.com"); req.Headers.Add("Connection", "Keep-Alive"); req.Headers.Add("Cache-Control", "no-cache"); req.Headers.Add("Cookie", "__utmc=140029553; __utma=140029553.1661295586.1330352934.1331336368.1331402208.44; __utmz=140029553.1331159433.33.7.utmcsr=meta.stackoverflow.com|utmccn=(referral)|utmcmd=referral|utmcct=/users/153008/cody-gray; __qca=P0-1737884911-1330352934366; usr=t=TJUTES9CakOu&s=f3MgHSwW2EWk; km_ai=91003; km_uq=; km_lv=x; km_ni=91003; __utmb=140029553.17.10.1331402208"); var requestMessage = Encoding.UTF8.GetBytes("fkey=abfd538253d7ca1e988f306ea992eda0"); var strm = req.GetRequestStream(); strm.Write(requestMessage, 0, requestMessage.Length); strm.Close(); var rep = req.GetResponse(); strm = rep.GetResponseStream(); var rdr = new StreamReader(strm); string responseFromServer = rdr.ReadToEnd(); Console.WriteLine(responseFromServer); rdr.Close(); strm.Close(); Console.Read();
There were some headlines that I would not write. For the Accept , Referer , User-Agent and Connection headers, he generated this error:
This title should be modified using the appropriate property or method.
and the Host header caused this error:
The host header cannot be changed directly.
I just commented on the headers that were causing the problems, optimistically hoping it would work anyway, but I got this message from the server
{"Success":false,"Warning":false,"NewScore":0,"Message":"","Refresh":false}
"Success":false , it seemed, indicated that he did not have time to start the message, and I went to the page, and he had the same vote count as before I started the program. In other words, my program did not work.
Does anyone know if I am on the right track, what can I do to make it work, or if it can even make it work?