Skip to content

Conversation

@dexhorthy
Copy link
Contributor

No description provided.

}
if respBody != nil {
if err := json.NewDecoder(resp.Body).Decode(respBody); err != nil {
bodyBytes, err := ioutil.ReadAll(resp.Body)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is less efficient to read all the bytes in one go, but I had changed this so I could view the json body to debug deserialization issues, and I think that extra debug value might be worth the performance hit.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's never a lot of data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my thoughts as well -- thanks

@dexhorthy dexhorthy requested a review from divolgin August 10, 2020 14:09
@dexhorthy dexhorthy merged commit 1287f66 into master Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants