Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static string GeneratesInsights([ActivityTrigger] AMSVideo amsVideoPublished, TraceWriter log)
// Building up Json sentence
dynamic flexibleObj = new ExpandoObject();
flexibleObj.assetId = amsVideoPublished.Asset.Id;
flexibleObj.videoFileName = amsVideoPublished.Video.VideoFileName;
flexibleObj.streamingVideoURL = amsVideoPublished.StreamingURL;
var jsonStr = JsonConvert.SerializeObject(flexibleObj);
using (var client = new HttpClient())
var content = new StringContent(jsonStr);
content.Headers.ContentType.CharSet = string.Empty;
content.Headers.ContentType.MediaType = "application/json";
var response = client.PostAsync(_logicappuri, content);
return response.Result.ToString();
catch (Exception)
return string.Empty;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment