As a Roblox Developer, it’s impossible to compress (gzip) requests through the :RequestAsync() option. Roblox offers a compress=true option in PostAsync().
Roblox should offer a compress gzip option. This will:
Make the HttpService:RequestAsync API cleaner
Bring the HttpService:RequestAsync up to par in ability with :PostAsync() method
It would be nice to have this as a option as it would save us and roblox precious bandwidth.
5 years later and RequestAsync still isn’t quite on par with PostAsync in all aspects.
Bumping this as I would still very much like this. There is an issue I am debugging with a server, and PostAsync fails if the status code isn’t 2xx. However, in order to use RequestAsync to be able to retrieve this data, I have to give up compression.
Bumping. Current in-dev experience relies heavily on external infra, and compressing our data is incredibly valuable to us. It would save a lot of network egress / ingress cost on GCP
Is there any update on this?
I assume it’s not high priority but this is still a good thing to have for us developers with external infrastructure, so knowing where this is along in the pipeline would be nice.
No ETA, but farther along than something we just want to have. The API proposal for this was accepted a while ago, but I think the team responsible for it has been busy.
It looks like feature flags are going live for this. “EnableRequestAsyncCompression_Rollout” went to “True;30;2023-12-13T22:35:40” Does this mean we will see this soon?
Many developers (including myself) use InfluxDB to store analytics and metrics. The recommended way by InfluxDB is to use gzip compression when uploading data.
I’m unable to do that, and suffer from performance issues when using RequestAsync because of that. Using PostAsync isn’t ideal as we don’t get the same level of verbosity to handle http responses.
Looks like roblox finally enabled it!
In order to use it right now you have to add a field called Compress with the value of Gzip.
Far as I can tell Gzip is the only option right now and it’s case sensitive, also it appears they do some sort of cost analysis and it may not compress all of the time.
For example if I have a body of 23 A’s it will compress, but if I have 22 it won’t compress it at all.
Hey @Dogekidd2012, I found a problem when using gzip compression.
When using gzip compression, the Content-Length header is not being set correctly.
For webservers which checks the Content-Length header, this is a huge problem as it will yield an error which means the HTTP request won’t be processed.
Good catch! I’ll file a bug in our internal tracker for this. Alternatively, if you can post bug reports, please file one as it is much more convenient.