Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Apache Commons HttpClient support GZIP?

Does the library Apache Commons HttpClient support Gzip? We wanted to use enable gzip compression on our Apache server to speed up the client/server communications (we have a php page that allows our Android application to sync files with the Server).

like image 838
benstpierre Avatar asked May 05 '10 21:05

benstpierre


People also ask

How do I enable gzip in Apache?

To turn on Gzip compression, simply add on to the gzip directive in the main Nginx configuration file. $ sudo nano /etc/nginx/nginx. conf gzip on; Add file types to compress.

What is gzip HTTP compression?

Gzip is a file format and software application used on Unix and Unix-like systems to compress HTTP content before it's served to a client.

What is the difference between HttpClient and CloseableHttpClient?

CloseableHttpClient is the base class of the httpclient library, the one all implementations use. Other subclasses are for the most part deprecated. The HttpClient is an interface for this class and other classes. You should then use the CloseableHttpClient in your code, and create it using the HttpClientBuilder .

Is Apache HttpClient thread safe?

HttpClient is fully thread-safe when used with a thread-safe connection manager such as MultiThreadedHttpConnectionManager.


1 Answers

Apache HttpClient 4.1 supports content compression out of the box along with many other features that were previously considered out of scope.

like image 108
ok2c Avatar answered Sep 21 '22 18:09

ok2c