IsRestricted Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Tests whether the specified HTTP header can be set for the request.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public Shared Function IsRestricted ( _
headerName As String _
) As Boolean
public static bool IsRestricted(
string headerName
)
public:
static bool IsRestricted(
String^ headerName
)
static member IsRestricted :
headerName:string -> bool
public static function IsRestricted(
headerName : String
) : boolean
Parameters
- headerName
Type: System. . :: . .String
The header to test.
Return Value
Type: System. . :: . .Boolean
true if the header is restricted; otherwise false.
Remarks
The IsRestricted method returns true to indicate that a header is restricted and must be set using properties instead of directly or is set by the system. The restricted headers are:
Accept
Connection
Content-Length
Content-Type
Date
Expect
Host
If-Modified-Since
Range
Referer
Transfer-Encoding
User-Agent
Proxy-Connection
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.