CodenameOne
CodenameOne copied to clipboard
RequestBuilder.gzip is marked as Deprecated incorrectly
Describe the bug
The RequestBuilder
has a method gzip
implemented as follows:
public RequestBuilder gzip() {
header("Accept-Encoding", "gzip");
return this;
}
This method is marked as @deprecated this API was implemented incorrectly
Expected behavior
Looking at the code history, originally, this API also set a boolean flag on the RequestBuilder named isGzip
- however, that variable was removed in c9dbe5f1f80da4a2b6f195a97d997213402c0e7c, as part of fixing #2370
Section 12.5.3 of the documentation states that adding this header is the right way to activate Gzip compression, so to me, this implementation seems correct - and it seems to work fine too.
I would suggest that either the @deprecated
annotation be removed from this method, or the documentation should be updated with a correct implementation,