On Tue, 23 May 2017, at 01:33 PM, John Shahid wrote:
> The only way I can think of to fix this is either using
> ioutil.ReadAll(resp.Body) combined with json.Unmarshal, or use
> json.NewDecoder() followed by ioutil.ReadAll and discard the result.> What do
> you all think ?
>
I noticed just yesterday that your first suggestion is used in the
Google API client, e.g. when reading an error response:
https://github.com/google/google-api-go-client/blob/master/googleapi/googleapi.go#L114
Ian
--
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.
For more options, visit https://groups.google.com/d/optout.