I'm attempting to process a chunked response from a 3rd-party service by introducing it to httputil.NewChunkedReader
:
chunkedReader := httputil.NewChunkedReader(chunkedResponse)
buf := new(bytes.Buffer)
buf.ReadFrom(chunkedReader)
return buf.Bytes()
This code returns zero bytes, as does manually invoking reader.Read
.
I'm looking for a practical example in terms of implementing httputil.NewChunkedReader
.