Are there any issues with my multithreaded HttpClient?

后端 未结 4 1835
走了就别回头了
走了就别回头了 2021-02-04 16:47

So after dabbling with Java and HttpClient, I\'ve decided to transition to C# to try and lower the memory usage while increasing speed. I\'ve been reading tons of articles provi

4条回答
  •  时光取名叫无心
    2021-02-04 17:25

    The following methods are thread-safe:

    CancelPendingRequests
    DeleteAsync
    GetAsync
    GetByteArrayAsync
    GetStreamAsync
    GetStringAsync
    PostAsync
    PutAsync
    SendAsync
    

    More details:

    • Is HttpClient safe to use concurrently?
    • http://blogs.msdn.com/b/henrikn/archive/2012/08/07/httpclient-httpclienthandler-and-httpwebrequesthandler.aspx

提交回复
热议问题