HttpClient vs HttpWebRequest

前端 未结 3 1240
一向
一向 2020-12-02 15:27

I have a large file which I have to send to a web api client...The data is multi part. The issue is , if the file is sent over http web request, then it is uploaded quickly

3条回答
  •  抹茶落季
    2020-12-02 16:00

    I was using FileStreamContent with httpclient...But when I used ByteArrayContent, it worked fine.

    I am not sure how and why this made the difference, but sending bytes over the stream is a better way rather than sending the stream

提交回复
热议问题