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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.