sorry, but why all the HttpResponse methods to get content/body are suspended? Shouldnt the content be already there?
a
Aleksei Tirman [JB]
06/14/2024, 8:27 AM
One reason is that the body could potentially be huge, so loading it into memory might not be the best option.
j
Johann Pardanaud
06/14/2024, 8:35 AM
Also, I guess Ktor probably starts routing the request even before the body is entirely received?
Imagine you receive a 50 MiB payload, you might want to be able to drop the request before receiving the whole payload (e.g. if the API key is invalid)
e
elect
06/14/2024, 11:19 AM
yeah, in those situation it makes sense
sorry, my case is usually less than 100 lines, I'll go with