Guest User

Guest User

  • Tech Writer
  • 103
  • 13.5k

Convert code c# to jquery.

May 27 2021 9:19 AM
Hello every one I have use this code for get notification data 
var url = "https://onesignal.com/api/v1/notifications?app_id=8c8e38ee-443a-4684-b6fa-6b932f8fc572";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Headers["Authorization"] = OneSignalNotificationKey;
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
But i want to use this data in jquery Please convert this data in jquery
 

Answers (2)