Interface term

Outline:

1.httpclient

2.

 

A, httpclient

 1. Definitions:

HTTP protocol support client-side programming toolkit, and it supports the latest version of the HTTP protocol and recommendations.

2. Functions:

(1) implements all methods of HTTP (GET, POST, PUT, HEAD, etc.)
(2) support automatic steering
(3) support the HTTPS protocol
(4) supports proxy servers, etc.

3. Use the method.

To get an example:

1. Create an instance of HttpClient
2. Create an instance of some kind of connection methods, here is GetMethod. In GetMethod the constructor incoming address to be connected
3. Call the first step to create a good example of the execute method to perform the second step of the method to create a good example
4. Read response
5. release the connection. Whether the implementation of the method is successful, the connection must be released
6. contents obtained after processing
According to the above steps, we have to prepare using GET method to get a page of code content.

 

Guess you like

Origin www.cnblogs.com/huanlfu/p/11266018.html