https://stackoverflow.com/questions/21816691/streaming-chunked-http-and-nsurlsession-hanging
参考这个回答吧,需要把服务端的 Content-Type 参数设置为 "application/json"
这样就不会有buffer缓冲区,导致一定在 512 byte 后才有第一次回调。
客户端代码不用改!!!
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: