注意:这是在Silverlight 1.1 Alpha中粗略测试的结果,如有错误,欢迎指正!
Alpha还是Alpha,连HttpWebRequest都这么不成熟,最常用的timeout属性居然既不能设置也不能更改,实在是郁闷!花了点时间,把所有的属性的读和写都测试了一遍。
能写的属性如下(其中被注释的表示不能写):
request.Accept = "text/*";
//request.Address.ToString(); readonly
//request.AllowAutoRedirect = true;
//request.AllowWriteStreamBuffering = true;
//request.AutomaticDecompression
request.Connection = "Close";
request.ContentLength = 256;
request.ContentType = "text/xml";
request.Expect = "100-Continue";
//request.HaveResponse.ToString(); readonly
request.Headers["Accept-Language"] = "zh-cn";
//request.KeepAlive = false;
//request.MediaType = "text/html";
request.Method = "POST";
//request.Pipelined = true;
//request.PreAuthenticate = true;
//request.ProtocolVersion = HttpVersion.Version10;
//request.ReadWriteTimeout = 10 * 1000;
request.Referer = "http://www.ooboy.net";
//request.RequestUri.ToString(); readonly
//request.SendChunked = true;
//request.Timeout = 10 * 1000;
request.TransferEncoding = "UTF-8";
//request.UserAgent = "Test Client";
能读的属性如下(其中被注释的表示不能读):
testInfo.Text = "Accept: " + request.Accept;
testInfo.Text += "\nAddress: " + request.Address.ToString();
testInfo.Text += "\nAllowAutoRedirect: " + request.AllowAutoRedirect.ToString();
testInfo.Text += "\nAllowWriteStreamBuffering: " + request.AllowWriteStreamBuffering.ToString();
testInfo.Text += "\nAutomaticDecompression: " + request.AutomaticDecompression.ToString();
testInfo.Text += "\nConnection: " + request.Connection;
testInfo.Text += "\nContentLength: " + request.ContentLength.ToString(); //设置后才可读
testInfo.Text += "\nContentType: " + request.ContentType;
testInfo.Text += "\nExpect: " + request.Expect;
testInfo.Text += "\nHaveResponse: " + request.HaveResponse.ToString();
testInfo.Text += "\nHeaders: " + request.Headers["Accept-Language"];
//testInfo.Text += "\nKeepAlive: " + request.KeepAlive.ToString();
//testInfo.Text += "\nMediaType: " + request.MediaType;
testInfo.Text += "\nMethod: " + request.Method;
//testInfo.Text += "\nPipelined: " + request.Pipelined.ToString();
//testInfo.Text += "\nPreAuthenticate: " + request.PreAuthenticate.ToString();
//testInfo.Text += "\nProtocolVersion: " + request.ProtocolVersion.ToString();
//testInfo.Text += "\nReadWriteTimeout: " + request.ReadWriteTimeout.ToString();
testInfo.Text += "\nReferer: " + request.Referer;
testInfo.Text += "\nRequestUri: " + request.RequestUri.ToString();
//testInfo.Text += "\nSendChunked: " + request.SendChunked.ToString();
//testInfo.Text += "\nTimeout: " + request.Timeout.ToString();
testInfo.Text += "\nTransferEncoding: " + request.TransferEncoding;
testInfo.Text += "\nUserAgent: " + request.UserAgent;
您可能对这些文章也感兴趣:- Path的Stroke和Fill属性不能指向同一个SolidColorBrush对象?
- 用JavaScript调用Silverlight(C#)中的方法
- Silverlight中XmlReader解析XML的流程
- [翻译]The Web Is Dead
- 在Silverlight中使用中文
- 其实BrowserHost.Resize好像有个BUG
- Silerlight也可以不放在页面的顶层
- 让Silverlight User Control接收键盘消息
- Silverlight Alpha 1.1十一月份不会过期
- Beta版终究是Beta版
与该文相关的评论:(我也想说几句)Processed in 0.1249984 second(s) , unknow queries
Powered by OWord V0.1, Even Not Alpha
(此博客程序为半成品,请勿索取,以免给您的心灵造成创伤^_^)
鄂ICP备05026031号
2007-10
我来说两句:
用户中心
日志分类

最新日志
统计信息





