I'm looking for a WebHelper class for C#, one that wraps and stuff all the common requests, such as like POSTing and GETting http requests etc.
+3
A:
Aren't System.Net.WebClient
and System.Net.WebRequest
already doing this for you pretty elegantly?
Mehrdad Afshari
2010-02-12 17:52:39
Yea, I want like a wrapper for all that though. I wanna do like string html = WebHelper.Post(string url, Dictionary<string, string> postdata) etc.etc. I mean I could write my own WebHelper class to do this but I'm sure better ones are out there.
Joshua
2010-02-12 17:54:15
I agree. These are wrappers around the HttpWebRequest/Response, which is what you'd be doing if you rolled your own "WebHelper."
ebpower
2010-02-12 17:55:15
`new WebClient().UploadString` pretty much does something like what you want.
Mehrdad Afshari
2010-02-12 17:57:14