System.Web.HttpWorkerRequest.GetKnownRequestHeader Method

Returns the standard HTTP request header that corresponds to the specified index.

Syntax

public virtual string GetKnownRequestHeader (int index)

Parameters

index
The index of the header. For example, the HttpWorkerRequest.HeaderAllow field.

Returns

The HTTP request header.

Remarks

For example to obtain the value of the Content-Length header, you can use:

C# Example

    string value = worker_request.GetKnownRequestHeader (HttpWorkerRequest.HeaderContentLength);
  

Requirements

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