开发者

C# Equivalent of Snoopy

开发者 https://www.devze.com 2022-12-28 05:18 出处:网络
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 S

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号