Android Question compress http put request

dcoun

Member
Licensed User
Longtime User
Hi,
How can I make a compressed PUT http request to an apache server from B4A?
Is it compressed by default?
Also, does the OKhttp library provides in headers that it accepts compressed response?
Thank you in advance
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Also, does the OKhttp library provides in headers that it accepts compressed response?
Yes. And it handles responses decompression automatically.

Is it compressed by default?
No. After a lot of digging I can say that it is currently not possible to send gzip compressed requests unless you compress the data yourself (CompressedStreams from RAF) and decompress it on the server. The content length header will show the compressed length.
 
Upvote 0

dcoun

Member
Licensed User
Longtime User
Thank you very much Erel.
There are many examples in the forum that co-work with php.
Do you recommend one of them?
 
Upvote 0
Top