private async Task <ServiceEvent <JToken> > doSubscribe(string channelName) { if (channel == null) { await EnableNotifications(); } var resource = "/subscriptions/" + WebUtility.UrlEncode(app.Name) + (string.IsNullOrWhiteSpace(channelName) ? "" : "/" + WebUtility.UrlEncode(channelName)); var body = new CreateSubscriptionBody(new Uri(channel.Uri, UriKind.Absolute)); return(await Url.Concat(resource).ExecuteAsync <JToken>(app, body.ToJToken(), "POST")); }
private async Task<ServiceEvent<JToken>> doSubscribe(string channelName) { if (channel == null) { await EnableNotifications(); } var resource = "/subscriptions/" + WebUtility.UrlEncode(app.Name) + (string.IsNullOrWhiteSpace(channelName) ? "" : "/" + WebUtility.UrlEncode(channelName)); var body = new CreateSubscriptionBody(new Uri(channel.Uri, UriKind.Absolute)); return await Url.Concat(resource).ExecuteAsync<JToken>(app, body.ToJToken(), "POST"); }