System.Net.HttpListenerRequest Class

Describes an incoming HTTP request to an System.Net.HttpListener object. This class cannot be inherited.

See Also: HttpListenerRequest Members

Syntax

public sealed class HttpListenerRequest

Remarks

When a client makes a request to a Uniform Resource Identifier (URI) handled by an System.Net.HttpListener object, the System.Net.HttpListener provides a System.Net.HttpListenerContext object that contains information about the sender, the request, and the response that is sent to the client. The HttpListenerContext.Request property returns the System.Net.HttpListenerRequest object that describes the request.

The System.Net.HttpListenerRequest object contains information about the request, such as the request HttpListenerRequest.HttpMethod string, HttpListenerRequest.UserAgent string, and request body data (see the HttpListenerRequest.InputStream property).

To reply to the request, you must get the associated response using the HttpListenerContext.Response property.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0