[HttpClient] HttpClient Introduction

Source: Internet
Author: User
Tags response code

1. Preface

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, the JDK 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. HttpClient has been used in many projects, such as the two other open source projects that are famous on Apache Jakarta Cactus and Htmlunit use HttpClient. Now HttpClient latest version is HttpClient 4.4 (GA) (2015-02-05)

2. Main function Introduction

1) All methods of HTTP are implemented (POST, GET, PUT, head, etc.)

2) Support automatic steering

3) Support HTTPS protocol

4) Support Proxy server, etc.

3. Features

1) based on the standard, pure Java language. Http1.0 and Http1.1 are implemented

2) implements the full HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) with an extensible object-oriented architecture.

3) Support HTTPS protocol.

4) Establish a transparent connection through an HTTP proxy.

5) Use the Connect method to establish an HTTPS connection to the tunnel through an HTTP proxy.

6) Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, Snpnego/kerberos certification program.

7) Plug-in custom authentication scheme.

8) A portable and reliable socket factory makes it easier to use third-party solutions.

9) The Connection Manager supports multi-threaded applications. Supports setting the maximum number of connections, supports setting the maximum number of connections per host, and discovers and closes expired connections.

10) Automatic processing of cookies in Set-cookie.

11) Plug-in custom cookie policy.

The output stream of the request can avoid buffering the contents of the stream directly to the socket server.

Response input stream can be effectively read from the socket server directly corresponding content.

14) Maintain a persistent connection using keepalive in http1.0 and http1.1.

15) Get the response code and headers sent by the server directly.

16) The ability to set the connection timeout.

17) Experimental support http1.1 response caching.

18) Source code is available for free based on Apache License.

[HttpClient] HttpClient Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.