예제 #1
0
 public async Task <bool> RegisterNotificationHub(NotificationHubRegistration payload)
 {
     try
     {
         return(await _chatService.RegisterNotificationHub(payload));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
예제 #2
0
        public async Task <bool> RegisterNotificationHub(NotificationHubRegistration payload)
        {
            try
            {
                var response = await _serviceBase.Post(JsonConvert.SerializeObject(payload), Constants.RegisterNotificationHubTokenUrl);

                if (response.IsSuccessStatusCode)
                {
                    var result = await response.Content.ReadAsStringAsync();

                    return(true);
                }
                return(false);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }