HttpWebRequest.Expect 属性

定义

获取或设置 Expect HTTP 标头的值。Gets or sets the value of the Expect HTTP header.

public:
 property System::String ^ Expect { System::String ^ get(); void set(System::String ^ value); };
public string Expect { get; set; }
member this.Expect : string with get, set
Public Property Expect As String

属性值

Expect HTTP 标头的内容。The contents of the Expect HTTP header. 默认值是 nullThe default value is null.


此属性的值存储在 WebHeaderCollection 中。The value for this property is stored in WebHeaderCollection. 如果设置了 WebHeaderCollection,则该属性值将丢失。If WebHeaderCollection is set, the property value is lost.

异常

Expect 设置为一个包含“100-continue”的字符串作为子字符串。Expect is set to a string that contains "100-continue" as a substring.

适用于

另请参阅