开发者

HttpWebRequest submit

Sorry for s开发者_StackOverflow中文版uch popular question, but, i don't need fill anything, i just need press a submit button on html page, how can i do it, via HttpWebRequest?


Well, you need to know:

  • Whether there are any hidden pre-populated fields or other data required for the submission
  • The URL to submit to
  • The HTTP method (GET/POST)

But yes, it can all be done with HttpWebRequest.

If you don't have any extra data, it may be as simple as creating the web request, setting the method appropriately, and then calling GetResponse. If you need to include data, it may be in the query part of the URL (if it's a GET request) or the body (if it's a POST request).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜