开发者

HTTP Client Request with headers and POST in DotNet?

in Java I have a HTTPClient which use Headers in a POST Method with a website to send a request and get a answer.

With which component I ca开发者_StackOverflow社区n do that in C#.net?


How about HttpWebRequest.


If you mean, "what is the equivalent way of writing a simple http client in C#?", then you have a few options.

The most obvious is the System.Net.WebClientclass. This is a nice and simple, easy to use, web client that provides functionality for the most common web operations.

If you wanted to go a little deeper, then the System.Net.HttpWebRequest and System.Net.HttpWebResponse classes give you access to lower level workings of http web requests and responses.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜