HttpClient教程 前言

本文详细介绍了HttpClient作为客户端HTTP传输库的功能及特点。HttpClient不仅提供高效的HTTP消息传输能力,还支持最新的HTTP标准,适用于各种HTTP-aware客户端应用。

1、本文档为翻译官方文档,如有纰漏请指教  http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/index.html

前言

Preface

The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.

超文本传输协议(HTTP),也许是当今互联网上使用最多的协议。Web服务、网络设备和网络计算的发展壮大,HTTP协议的作用超出用户驱动的Web浏览器,同时应用软件的增加也需要HTTP的支持。------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.

尽管java.net包提供通过HTTP访问资源的基本功能,但是它并不全面,灵活也没有提供许多应用程序所需的功能。HttpClient试图填补这一空白通过提供一个有效的、最新的、功能丰富的最近HTTP标准和建议的方案实现客户端。------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.

被设计成可拓展和对HTTP协议强力支持的HttpClient可能对创建任何一个HTTP-aware客户端应用程序感兴趣,例如web浏览器、web服务客户端或者拓展分布式的HTTP协议。--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1. HttpClient scope

  • Client-side HTTP transport library based on HttpCore

  • Based on classic (blocking) I/O

  • Content agnostic

1、HttpClient 范围

        *客户端基于HTTP传输协议库HttpCore

        *基于典型的阻塞I/O

        *上下文无关

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2. What HttpClient is NOT
   HttpClient is NOT a browser. It is a client side HTTP transport library. HttpClient's purpose is to transmit and receive HTTP messages. HttpClient will not attempt to process content, execute javascript embedded in HTML pages, try to guess content type, if not explicitly set, or reformat request / rewrite location URIs, or other functionality unrelated to the HTTP transport.

2.HttpClent不是什么

     HttpClent不是浏览器。它是一个HTTP传输库的客户端。如果没有显式地设置,或重新格式化请求uri /重写位置,或其他功能无关的HTTP传输,HttpClient主要用途是传输和接收HTTP消息。HttpClient不能尝试处理内容,执行嵌套在html内的javascript,尝试猜测内容类型,

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

下一章:基本原理


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值