O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Identifying Notifications in an HttpWebResponse

Common to all push notification types is an optional custom header named X-MessageID, which can be added to the HttpWebRequest.Headers collection. Its purpose is to uniquely identify the notification message, and if present, the same value is able to be retrieved in the notification response. It must be a string that contains a universally unique identifier (UUID), as shown in the following excerpt:

request.Headers.Add("X-MessageID", "<UUID>");

At the time of writing, this header does not serve any purpose, because the resulting HttpWebResponse is retrieved using the original HttpWebRequest. It is, therefore, trivial to identify a notification based on an HttpWebResponse. In the future, however, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required