Dela via


RawNotification.Headers Property

Definition

Gets the raw header content from the notification.

public:
 property IMapView<Platform::String ^, Platform::String ^> ^ Headers { IMapView<Platform::String ^, Platform::String ^> ^ get(); };
IMapView<winrt::hstring, winrt::hstring const&> Headers();
public IReadOnlyDictionary<string,string> Headers { get; }
var iMapView = rawNotification.headers;
Public ReadOnly Property Headers As IReadOnlyDictionary(Of String, String)

Property Value

IMapView<String,String>

IReadOnlyDictionary<String,String>

IMapView<Platform::String,Platform::String>

IMapView<winrt::hstring,winrt::hstring>

A map view of the header values. See remarks for the header format.

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

Header format:

Content-Encoding: aesgcm
Crypto-Key: dh=<PUBLICKEY>
Encryption: salt=<SALT>

For more information and to learn how headers are defined, see Message Encryption for Web Push, section 3.2.

The header content is for notifications sent using a channel created with CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync and pushed to WNS using the Webpush protocol with VAPID authentication. For any other type of push notification, the header value is null.

Applies to