This topic has not yet been rated - Rate this topic

DataServiceContext.WritingRequest Event

Windows Phone

March 22, 2012

Occurs before the request message to the data service is written.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public event EventHandler<ReadingWritingHttpMessageEventArgs> WritingRequest

The WritingRequest event is raised before the outgoing message stream is written. This enables you to process a request before it is written by the client library, which is required if you need to compress a request to the data service.

The message body is accessed as a Stream object obtained from the Content property of the ReadingWritingHttpMessageEventArgs object. The client always disposes of the returned stream.

For a batched request, the WritingRequest event is raised for the batch request and once for each request contained in the batch request.

This event is raised only for requests that have content in the message body. This means that this event is not raised for GET or DELETE requests.

Windows Phone OS

Supported in: 7.1

Windows Phone

Did you find this helpful?
(1500 characters remaining)