Open
Description
The API client functions all follow this pattern, where they make an http call to get back a []byte
then decode the JSON:
client_golang/api/prometheus/v1/api.go
Lines 830 to 836 in f63e219
For larger responses, this buffer gets quite expensive (see #976).
I propose that instead we parse JSON from the response body as it comes in.
I can see that this would make handling timeouts more complicated.