The current engine returns response content in the body. When content size is large (hundreds of MB), this content will be held in memory.
When there are multiple threads fetching large dataset, it can crash boxes with low memory.
Can we have an engine that returns IO object to response content?
# musing with possible API
RC::Universal.new(
'response_body' => 'io', # defaults to response content when unspecified, which is the current behavior
'site' => 'http://large.size.api/',
).get('/')
``
The current engine returns response content in the body. When content size is large (hundreds of MB), this content will be held in memory.
When there are multiple threads fetching large dataset, it can crash boxes with low memory.
Can we have an engine that returns IO object to response content?