Android与服务器通信常用Http类粗译
来源:互联网 发布:逆袭网络剧第一集哇趣 编辑:程序博客网 时间:2024/06/05 13:21
message
including it's headers
and optional entity
, and connections
over which messages are sent. In order to prepare messages before sending or after receiving, there are interceptors for requests
and responses
.HttpEntity
An entity that can be sent or received with an HTTP message. Entities can be found in some requests
and in responses
, where they are optional.
In some places, the JavaDoc distinguishes three kinds of entities, depending on where their content
originates:
- streamed: The content is received from a stream, or generated on the fly. In particular, this category includes entities being received from a
connection
.Streamed
entities are generally notrepeatable
. - self-contained: The content is in memory or obtained by means that are independent from a connection or other entity. Self-contained entities are generally
repeatable
. - wrapping: The content is obtained from another entity.
public abstract InputStream getContent ()
Creates a new InputStream object of the entity. It is a programming error to return the same InputStream object more than once. Entities that are not repeatable
will throw an exception if this method is called multiple times.
public abstract boolean isRepeatable ()
Tells if the entity is capable to produce its data more than once. A repeatable entity's getContent() and writeTo(OutputStream) methods can be called more than once whereas a non-repeatable entity's can not.
public abstract void writeTo (OutputStream outstream)
Writes the entity content to the output stream.
HttpMessage
HttpResponse
implements HttpMessagepublic abstract HttpEntity getEntity ()
Obtains the message entity of this response, if any. The entity is provided by calling setEntity
.
HttpClient
HttpGet
extends HttpRequestBaseThe HTTP GET method is defined in section 9.3 of RFC2616:
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.
Get Methods will follow redirect requests from the http server by default. This behaviour can be disabled by calling setFollowRedirects(false).
- Android与服务器通信常用Http类粗译
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android HTTP 实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- Android操作HTTP实现与服务器通信
- ESB产品架构之事务管理
- 中医教你看唇色辨健康
- 升级到iOS5后ASIHttpRequest库问题及解决方法
- Datafactory 使用表的选择字段时的注意点
- Android应用开发揭秘(奋斗之小鸟)_PDF 电子书
- Android与服务器通信常用Http类粗译
- ASIHttpRequest库简介、配置和安装
- 开始总是很艰难。
- QT中窗口刷新事件的学习总结
- Activity <Name> has leaked ServiceConnection com.google.android.vending.licensing.LicenseChecker
- delphi InputBox输入密码用*代替,怎样让delphi的inputbox输入框显示密码代表符*
- 静态库和动态库的区别
- 学习笔记——两单链表的第一个公共结点
- 异步加载动态进度条,显示百分比