WebOperationContext.IncomingRequest Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Web request context for the request being received.
public:
property System::ServiceModel::Web::IncomingWebRequestContext ^ IncomingRequest { System::ServiceModel::Web::IncomingWebRequestContext ^ get(); };
public System.ServiceModel.Web.IncomingWebRequestContext IncomingRequest { get; }
member this.IncomingRequest : System.ServiceModel.Web.IncomingWebRequestContext
Public ReadOnly Property IncomingRequest As IncomingWebRequestContext
Property Value
An IncomingWebRequestContext instance.
Examples
The following code shows how to use the IncomingRequest property to access the headers in the incoming HTTP request.
WebOperationContext current = WebOperationContext.Current;
WebHeaderCollection headers = current.IncomingRequest.Headers;
foreach (string name in headers)
{
Console.WriteLine(name + " " + headers.Get(name));
}
Dim current As WebOperationContext = WebOperationContext.Current
Dim headers As WebHeaderCollection = current.IncomingRequest.Headers
For Each name As String In headers
Console.WriteLine(name + " " + headers.Get(name))
Next
Applies to
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.