C# Equivalent of Snoopy
Snoopy is a PHP class that provides the functionality of a web-browser. Is there anything that does the sam开发者_如何学Pythone in C#? I'm having lots of trouble with handling cookies, etc.
What about Snoopy do you need? There is a WebBrowser Class in C#
You don't specify what about cookies are giving you problems, so this is the best I can do for now for that part:
- http://www.google.com/search?q=c%23+cookies
- https://stackoverflow.com/search?q=c%23+cookies
The simplest thing would be HttpWebRequest - you create one like this:
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://www.example.com/");
//set request properties
//get response
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
And you can then set headers, cookies etc. You could write your own wrapper class to give it an interface similar to Snoopy.
精彩评论