addValue:forHTTPHeaderField: http头的组成
2015-11-26 18:17
525 查看
一直不理解 addValue:forHTTPHeaderField:是来做什么的,看了下面的文章的才理解了。
以下摘自:http://blog.csdn.net/tianxinet/article/details/964993,非常感谢作者!
http头的组成:
==============
HTTP头字段包括4类:
general-header ;
request-header ;
response-header ;
entity-header .
*******************************************************************************
General Header Fields
=============================
general header是request、response都可用的, 但是不能用于entity.
-- Cache-Control
-- Connection
-- Date
-- Pragma
-- Trailer
-- Transfer-Encoding
-- Upgrade
-- Via
-- Warning
*******************************************************************************
Request Header Fields
======================
request-header fields 允许客户端传递关于request和客户端的附加信息到服务端,
-- Accept
-- Accept-Charset
-- Accept-Encoding
-- Accept-Language
-- Authorization
-- Expect
-- From
-- Host
-- If-Match
-- If-Modified-Since
-- If-None-Match
-- If-Range
-- If-Unmodified-Since
-- Max-Forwards
-- Proxy-Authorization
-- Range
-- Referer
-- TE
-- User-Agent
*******************************************************************************
Response Header Fields
===============================
response-header fields 允许服务端传递关于response的、不能放到Status-Line的附加信息。
这些头给出关于服务端的信息。
-- Accept-Ranges
-- Age
-- ETag
-- Location
-- Proxy-Authenticate
-- Retry-After
-- Server
-- Vary
-- WWW-Authenticate
*******************************************************************************
Entity Header Fields
========================
Entity-header fields 定义关于entity-body的metainformation(标题字段数据),
如果当前没有body, 则定义被request确定的资源信息.
一些metainformation是可选的; 一些是必须的。
-- Allow
-- Content-Encoding
-- Content-Language
-- Content-Length
-- Content-Location
-- Content-MD5
-- Content-Range
-- Content-Type
-- Expires
-- Last-Modified
-- extension-header
以下摘自:http://blog.csdn.net/tianxinet/article/details/964993,非常感谢作者!
http头的组成:
==============
HTTP头字段包括4类:
general-header ;
request-header ;
response-header ;
entity-header .
*******************************************************************************
General Header Fields
=============================
general header是request、response都可用的, 但是不能用于entity.
-- Cache-Control
-- Connection
-- Date
-- Pragma
-- Trailer
-- Transfer-Encoding
-- Upgrade
-- Via
-- Warning
*******************************************************************************
Request Header Fields
======================
request-header fields 允许客户端传递关于request和客户端的附加信息到服务端,
-- Accept
-- Accept-Charset
-- Accept-Encoding
-- Accept-Language
-- Authorization
-- Expect
-- From
-- Host
-- If-Match
-- If-Modified-Since
-- If-None-Match
-- If-Range
-- If-Unmodified-Since
-- Max-Forwards
-- Proxy-Authorization
-- Range
-- Referer
-- TE
-- User-Agent
*******************************************************************************
Response Header Fields
===============================
response-header fields 允许服务端传递关于response的、不能放到Status-Line的附加信息。
这些头给出关于服务端的信息。
-- Accept-Ranges
-- Age
-- ETag
-- Location
-- Proxy-Authenticate
-- Retry-After
-- Server
-- Vary
-- WWW-Authenticate
*******************************************************************************
Entity Header Fields
========================
Entity-header fields 定义关于entity-body的metainformation(标题字段数据),
如果当前没有body, 则定义被request确定的资源信息.
一些metainformation是可选的; 一些是必须的。
-- Allow
-- Content-Encoding
-- Content-Language
-- Content-Length
-- Content-Location
-- Content-MD5
-- Content-Range
-- Content-Type
-- Expires
-- Last-Modified
-- extension-header
相关文章推荐
- HTTP协议的一些点
- js中XMLHttpRequest对象实现GET、POST异步传输
- vlc 网页插件的 使用与控制 API http://www.xuebuyuan.com/2224602.html
- C++箴言:争取异常安全的代码 http://dev.yesky.com/490/2087990.shtml
- Android网络编程常用的三种方法
- php http
- 如何编写异常安全的C++代码 http://blog.csdn.net/wingfiring/article/details/660900
- 【网络】远程通信(RPC,Webservice,RMI,JMS、EJB、JNDI的区别)对比
- centos下使用nginx搭建https服务器
- C++异常安全 http://www.cnblogs.com/qinfengxiaoyue/p/3713762.html
- 平衡树:2-3-4 Tree的实现与分析 http://blog.chinaunix.net/uid-23629988-id-3152495.html
- 从2-3-4树谈到Red-Black Tree(红黑树) http://www.cnblogs.com/guoyiqi/archive/2011/06/08/2129310.html
- android okhttp 无法获取文件长度问题
- android访问网络:HttpURLConnection和HttpClient
- Wireshark实战分析之TCP协议(二)
- http协议之初识
- windows udp网络数据包收发控制
- 为golang程序使用pprof远程查看httpserver运行堆栈,cpu耗时等信息
- TCP协议模拟用户登录
- 计算机网络---基础题目汇总三