Sadly Decode does collect up the entire res.Body into memory.
See https://github.com/golang/go/issues/33714

On Tuesday, 26 October 2021 at 15:25:28 UTC+1 RS wrote:

> err = json.NewDecoder(res.Body).Decode(&gr)
> if err != nil {
> log.Println("ERROR:", err)
> return
> }
>
> Using json.newdecoder to decode the coming response body from client? 
> Here is also the issue of " loading the entire response in memory and 
> parsing it" is a matter?
> As I am not using a buffer to copy?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ab60d03f-b130-486d-8788-7a3b8581d06dn%40googlegroups.com.

Reply via email to