WebOperationContext.OutgoingRequest 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 sent.
public:
property System::ServiceModel::Web::OutgoingWebRequestContext ^ OutgoingRequest { System::ServiceModel::Web::OutgoingWebRequestContext ^ get(); };
public System.ServiceModel.Web.OutgoingWebRequestContext OutgoingRequest { get; }
member this.OutgoingRequest : System.ServiceModel.Web.OutgoingWebRequestContext
Public ReadOnly Property OutgoingRequest As OutgoingWebRequestContext
Property Value
An OutgoingWebRequestContext instance.
Examples
The following code shows how to set the method, content type and add a header to the outgoing request.
WebOperationContext.Current.OutgoingRequest.Headers.Add("Slug", "title");
WebOperationContext.Current.OutgoingRequest.Method = "GET";
WebOperationContext.Current.OutgoingRequest.ContentType = "application/octet-stream";
WebOperationContext.Current.OutgoingRequest.Headers.Add("Slug", "title")
WebOperationContext.Current.OutgoingRequest.Method = "GET"
WebOperationContext.Current.OutgoingRequest.ContentType = "application/octet-stream"
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.