简体   繁体   中英

Streaming output from an API

We have rest APIs built using Jersey and JAXB. It works well but I would like to know if we can stream the output instead of constructing the entire json/xml and then sending it out. Since our responses are basically a list of huge items, we want to do something where the caller can start getting data as and when we construct the individual items in the list.

Is this even possible?

您可以使用分页,客户每次需要时都会询问下一页(例如,滚动结束)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM