理想与现实之间

学习的最好方法就是blog

博客园 首页 新随笔 联系 订阅 管理

还是前天的那个encoding的问题。今天坐车的时候我突然想到,HttpWebResponse的对象应该有保存了Encoding相关的信息,回来一查 HttpWebResponse 对象的 ContentEncoding Property似乎与此有关,msdn上这样说:

Gets the method used to encode the body of the response.

public string ContentEncoding {get;}

Property Value

A string describing the method used to encode the body of the response.

Remarks

The ContentEncoding property contains the value of the Content-Encoding header returned with the response.


然而,我试了几个网站,这个属性都返回空字符串,这是怎么回事呀?

posted on 2004-03-18 21:37  Justin Shen  阅读(1574)  评论(4编辑  收藏  举报