System.Net.HttpWebRequest.Expect Property

Gets or sets the value of the Expect HTTP header.

Syntax

public string Expect { get; set; }

Value

A string that contains the contents of the HTTP Expect header. The default value is null .

Exceptions

TypeReason
ArgumentExceptionThe value specified for a set operation is "100-continue". This value is case insensitive.

Remarks

Note:

By default, HttpWebRequest.Expect is null . Other values can be added to the list that HttpWebRequest.Expect maintains, or all values except "100-continue" can be deleted from the list by setting HttpWebRequest.Expect to null .

For additional information see section 14.20 of IETF RFC 2616 - HTTP/1.1.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0