Multiple HTTP request in C#

后端 未结 5 1002
北海茫月
北海茫月 2021-02-15 01:56

I need to send about 200 HTTP requests in parallel to different servers and get response. I use HttpWebRequest class in C#. But I don\'t see good time enhancement when requests

5条回答
  •  名媛妹妹
    2021-02-15 02:05

    Instead of starting up your own threads try using the asynchronous methods of HttpWebRequest such as HttpWebRequest.BeginGetResponse and HttpWebRequest.BeginGetRequestStream.

提交回复
热议问题