Can a web service return a stream?

前端 未结 12 1732
眼角桃花
眼角桃花 2021-02-02 09:23

I\'ve been writing a little application that will let people upload & download files to me. I\'ve added a web service to this applciation to provide the upload/download fun

12条回答
  •  情歌与酒
    2021-02-02 09:58

    Keep in mind that a web service request basically boils down to a single HTTP POST.

    If you look at the output of a .ASMX file in .NET , it shows you exactly what the POST request and response will look like.

    Chunking, as mentioned by @Guvante, is going to be the closest thing to what you want.

    I suppose you could implement your own web client code to handle the TCP/IP and stream things into your application, but that would be complex to say the least.

提交回复
热议问题