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
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.