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
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.