QuestionQ193
VerifiedConnect to and consume Azure services and third-party servicesYou are a developer at a Software as a Service (SaaS) company. You create solutions that enable notifications to be sent by using Azure Notification Hubs.
You need to create sample code that customers can use as a reference for sending raw notifications to Windows Push Notification Services (WNS) devices. The sample code must not use external packages.
How should you complete the code segment? Each code segment may be used once, more than once, or not at all.
Drag & Drop
var endpoint = "..."; var payload = "..."; var request = new HttpRequestMessage(HttpMethod.Post, endpoint); request.Headers.Add("X-WNS-Type", "wns/raw"); request.Headers.Add("ServiceBusNotification-Format", ""); request.Content = new StringContent(payload, Encoding.UTF8, ""); var client = new HttpClient(); await client.SendAsync(request);
Community Discussion