Share via


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

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

See Also

Reference

WebHeaderCollection Class

System.Net Namespace