C# - How to make a HTTP call

前端 未结 3 833
花落未央
花落未央 2020-11-29 08:28

I wanted to make an HTTP call to a website. I just need to hit the URL and dont want to upload or download any data. What is the easiest and fastest way to do it.

I

3条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 09:01

    WebClient is a shorter and more concise syntax but behind the scenes it uses a WebRequest, so in terms of performance it won't be faster, it will be equivalent. If you want it to be faster you will have to improve the server side script or your network infrastructure. The problem is not on the client side.

提交回复
热议问题