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
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.