1. What is HttpClient?
The HTTP protocol is probably the most widely used and most important protocol on the Internet now, and more and more Java applications need to access network resources directly through the HTTP protocol. while the basic functionality of accessing the HTTP protocol has been provided in the Java NET Package of the JDK, theJDK library itself provides a lack of functionality and flexibility for most applications.
HttpClient is a sub-project under Apache Jakarta Common to provide an efficient, up-to- date, feature-rich client programming toolkit that supports the HTTP protocol , and it supports the latest versions and recommendations of the HTTP protocol.
2. HttpClient Function Description:
The
main features provided by HttpClient are listed below, and more detailed features can be found in the HttpClient home page.
(1) Implementation of all HTTP methods (Get,post,put,head, etc.)
(2) Support automatic steering
(3) Support HTTPS protocol
(4) Support proxy server, etc.
3. Code emulation Browser behavior:
(1) Open browser
(2) input data
(3) hit enter
Java Basic Knowledge Enhancement Network programming note 19:android network communication httpclient and the traditional post, get mode difference