还是前天的那个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.


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

相关文章:

  • 2021-09-09
  • 2021-10-22
  • 2022-12-23
  • 2021-10-29
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-08-29
相关资源
相似解决方案