your question confuses the point.
if you absolutely need the whole answer as a string, then do it,
but if you can get away from it at all, use threads.
when you load the entire response into a string, the entire response body is present in memory at a time.
using threads, only a small portion of the response is stored in memory at a time.
The documentation says that, especially with several large queries at the same time, loading the entire request body into a string will require a large amount of memory.
pstanton
source share