1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-12 10:23:16 +03:00
Files
okhttp/samples/guide
Jesse Wilson 71a759f77e Move gzip() from RequestBody to Request.Builder (#8838)
On Request.Builder the one function can add the header
and apply compression. Otherwise the caller needs to
keep those calls in sync.

One severe drawback of this approach is the calls to
Request.Builder are now ordered. If you call gzip()
before you call post(), it'll crash. Worse, if you
call post() and then gzip() and then post() again
with a different body, it'll silently not compress
the new body. I don't love this drawback but I think
the mitigations aren't worth the effort.
2025-06-04 13:43:43 -04:00
..
2019-06-26 19:30:33 -07:00