Skip to content

How to send gzip payload for Cloudwatch's PutMetricData #2723

Answered by mullermp
cswilliams asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately the gzip story in Ruby V3 is not great. We intentionally squash Accept-Encoding here for responses:

# Removing this is necessary for most services to not break request
# signatures as well as dynamodb crc32 checks (these fail if the
# response is gzipped).
headers = { 'accept-encoding' => '' }
. I think you should be able to do this if you write a plugin that gzips the request body and insert it into the plugin stack immediately before signing. I also don't know if, you send a gzip request to cloud watch, if they will attempt to send you one back…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by cswilliams
Comment options

You must be logged in to vote
1 reply
@mullermp
Comment options

Comment options

You must be logged in to vote
1 reply
@mullermp
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants