spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.58k stars 38.13k forks source link

HTTP Streaming Directly to the OutputStream [SPR-12831] #17428

Closed spring-projects-issues closed 9 years ago

spring-projects-issues commented 9 years ago

Marcel Overdijk opened SPR-12831 and commented

Provide a way to returning a ResponseEntity containing a streaming output stream. This similar to Jersey's https://docs.oracle.com/javaee/6/api/javax/ws/rs/core/StreamingOutput.html

This is useful for large files to be downloaded.


Affects: 4.1.5

Issue Links:

Referenced from: commits https://github.com/spring-projects/spring-framework/commit/95f6e4cc9bda491e20da26ba05eb7ba3f3c15bbe

spring-projects-issues commented 9 years ago

Rossen Stoyanchev commented

As part of work for #16826 we've added support for returning ResponseEntity with an SseEmitter as the body as well as the more general ResponseBodyEmitter, which applies an HttpMessageConverter each time an object is emitted. I'm wondering if you have seen that?

spring-projects-issues commented 9 years ago

Rossen Stoyanchev commented

The new return value type is called StreamingResponseBody.