You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now the request body is by default read and copied to an in memory buffer. This behaviour increases the memory footprint in case we are uploading large data. Targeting use cases specific to passing large data in request body.
Ideally, in case of large data we want to rely on http1.1 chunking or http2 streaming, for that we need to bypass reading the data in memory for efficiency.
This copying happens at two places in request middlewares(in sequence) -
We can assume that for large data the request body will be an io.Reader and change code paths accordingly. We can introduce a flag notCopyRequestBody similar to notParseResponse
Recently try to read chunk-based data from a 3-party API, but need to fall back to using the standard net/http
Looking forward to seeing resty support this feature.
As of now the request body is by default read and copied to an in memory buffer. This behaviour increases the memory footprint in case we are uploading large data. Targeting use cases specific to passing large data in request body.
Ideally, in case of large data we want to rely on http1.1 chunking or http2 streaming, for that we need to bypass reading the data in memory for efficiency.
This copying happens at two places in request middlewares(in sequence) -
Possible solution -
io.Reader
and change code paths accordingly. We can introduce a flagnotCopyRequestBody
similar tonotParseResponse
This issue is similar to - #495
The text was updated successfully, but these errors were encountered: