Lotus@ 2018-12-19 12:14 采纳率: 100%
浏览 78

Angular HttpClient流

I'm developing an Angular application for Cordova/iOS. I get about 100 MB of data from the backend services which seems to let iOS' web-view (WKWebView) crash. At least I don't experience crashes with the test-backend which returns less data.

The data will be stored in IndexedDB, so there is no reason to fill the RAM with all this data.

So my idea is to stream the response directly into IndexedDB. There are libraries available which can do this even with JSON, e.g. Oboe.js or JSONStream.

Angular's HttpClient returns the whole response in a big string or JSON object which is not what I want. Is there a way I can process the response incrementally similar to this: https://stackoverflow.com/a/18964123/395879

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)