Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1207003
  • 博文数量: 233
  • 博客积分: 6270
  • 博客等级: 准将
  • 技术积分: 1798
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-26 08:32
文章分类

全部博文(233)

文章存档

2011年(31)

2010年(202)

我的朋友

分类: 系统运维

2010-05-24 23:06:35

1. POST的功能

在RFC2616中,POST的功能定义如下:

- Annotation of existing resources

- Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;

- Providing a block of data, such as the result of submitting a form, to a data-handling process;
- Extending a database through an append operation

 

2. 使用POST方法向服务器提交数据时,header域如何赋值?

常用的header域:

- Content-type域

  该域的取值范围请参看"Internet media type";

        如在提交纯文本数据时,该域设定为"application/x-www-form-urlencoded"

-  

 

3. 使用POST方法一般包含两个过程

- 向服务器发送请求,要求服务器接受并处理请求包中的数据

- 读取响应包,这个过程跟GET方法一样

 

4. GET和POST的区别

- GET通过URI传递参数,而POST把参数保持在数据包中;

  因此两个传递参数的方式不同,导致了传递的数据量也不同;

参考值: GET-2KB,POST-理论上无限制

- 编码方式不同

- 安全性,POST安全性相对较高

阅读(535) | 评论(0) | 转发(0) |
0

上一篇:Internet media type

下一篇:HTTP的GET和HEAD方法

给主人留下些什么吧!~~