How can I stream a response from WCF without buffering?

后端 未结 3 1709
攒了一身酷
攒了一身酷 2021-02-09 10:53

I have a restful (webHttpBinding) self-hosted WCF service. Most methods are returning xml or json version of objects to the client.

I have a couple of GET methods that t

3条回答
  •  再見小時候
    2021-02-09 11:16

    Just trick the browser into thinking there is an HTML response with the Multipart Content-Type

    http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

    I have used this for quite a few things including MJPEG but you can also use it for COMET / WebSocket like responses.

提交回复
热议问题