HttpWebRequest.Accept Property

 

Gets or sets the value of the Accept HTTP header.

Namespace:   System.Net
Assembly:  System (in System.dll)

member Accept : string with get, set

Property Value

Type: System.String

The value of the Accept HTTP header. The default value is null.

To clear the Accept HTTP header, set the Accept property to null.

System_CAPS_noteNote

The value for this property is stored in WebHeaderCollection. If WebHeaderCollection is set, the property value is lost.

The following code example sets the Accept property.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: