System.Net.HttpWebRequest.Accept Property

Gets or sets the value of the Accept HTTP header.

Syntax

public string Accept { get; set; }

Value

A string containing the value of the HTTP Accept header. The default value of this property is null.

Remarks

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

Note:

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

Requirements

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