Skip to content

Conversation

@keegancsmith
Copy link
Member

By directly passing in the body we will also get the ContentLength
header set.

Minor: we avoid the extra buffer than json.NewEncoder uses, and isntead
directly get the buffer from json.Marshal.

By directly passing in the body we will also get the ContentLength
header set.

Minor: we avoid the extra buffer than json.NewEncoder uses, and isntead
directly get the buffer from json.Marshal.
@keegancsmith keegancsmith requested a review from LawnGnome August 13, 2020 11:42
Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

I like it! The perils of copy/pasting blindly when refactoring.

Thanks! 👍

@keegancsmith keegancsmith merged commit 12fba59 into master Aug 14, 2020
@keegancsmith keegancsmith deleted the k/content-length branch August 14, 2020 17:51
scjohns pushed a commit that referenced this pull request Apr 24, 2023
By directly passing in the body we will also get the ContentLength
header set.

Minor: we avoid the extra buffer than json.NewEncoder uses, and instead
directly get the buffer from json.Marshal.
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