Commit d862a15
authored
feat: Gzip compression for Graphql request body (#328)
## Summary
Turn on Gzip compression for Graphql request body. Gzip is little better
for images.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds gzip-compressed request payload support (enabled by default) to
`GraphQLClient.execute`, updating headers and content length
accordingly.
>
> - **GraphQL client
(`sdk/@launchdarkly/observability-android/.../GraphQLClient.kt`)**:
> - `execute(...)`: adds `compress: Boolean = true`; gzips request body
when enabled; updates `Content-Length`, `Content-Encoding: gzip`, and
`setFixedLengthStreamingMode` to match compressed payload.
> - Adds private `gzip` helper using `GZIPOutputStream`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aa32a89. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 08c4d22 commit d862a15
File tree
1 file changed
+19
-4
lines changed- sdk/@launchdarkly/observability-android/lib/src/main/kotlin/com/launchdarkly/observability/network
1 file changed
+19
-4
lines changedLines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
| 94 | + | |
91 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
101 | | - | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
106 | | - | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
144 | 159 | | |
0 commit comments