Hey, trying to implement messaging feature using APIs that stream multiple responses. The responses are JSONs separated by new lines (so called json lines). I'm leveraging URLSessionDataTask and receiving responses in urlSession(_ session:, dataTask:, didReceive data:).
I've noticed that when response is bigger, which happens for first streamed line if there are a lot of conversations or messages, data comes in irregularly sized chunks, which I guess is to be expected from this delegate. My question is wether that chunking behaviour can be somehow prevented, and if not what would be the alternative to avoid having to handle buffering and appending bytes?
Thanks in advance, U.M.
Selecting any option will automatically load the page