Cfhttp gzip post


#1

if im using cfhttp to post data to and endpoint that supports gzip compressed payload. im setting the header to

Content-Encoding:gzip. 

how should i compress the content of the post ?


#2

I would use mod_deflate if you are using apache and you want to reduce the size of the data in transit to to the supported end users browser.


#3

apache doesn’t come into play as this is sending a http request not receiving one

there is a compression option, but i think it’s only used for request headers
http://docs.lucee.org/reference/tags/http.html
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/tag/Http.java#L653

I think what you are are after is something like a compress option for cfhttparam?
https://stackoverflow.com/questions/7153484/gzip-post-request-with-httpclient-in-java?noredirect=1&lq=1


#4

Yes exactly. I’m wanting to send the body content gzipped, to reduce network overhead. Where a server can receive it if it supports gzip compression. Specifically, I’m wanting to do this with an aws api gateway as I have read it supports it.