{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/comments/55916711","id":55916711,"diff_hunk":"@@ -0,0 +1,25 @@\n+﻿#r \"Newtonsoft.Json\"\n+\n+using System;\n+using System.Net;\n+using System.Net.Http;\n+using Microsoft.Azure.WebJobs.Host;\n+using Newtonsoft.Json;\n+\n+public static object Run(HttpRequestMessage req, TraceWriter log)\n+{\n+    log.Verbose($\"Webhook was triggered!\");\n+\n+    string jsonContent = req.Content.ReadAsStringAsync().Result;","path":"Templates/WebHook-Generic-CSharp/run.csx","position":null,"original_position":13,"commit_id":"b26bdb60c489a2b3b70816092895eed58d892d0a","original_commit_id":"f851ec6fc9b2634574114f4360820a976e13999f","user":{"login":"fabiocav","id":2507935,"avatar_url":"https://avatars.githubusercontent.com/u/2507935?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiocav","html_url":"https://github.com/fabiocav","followers_url":"https://api.github.com/users/fabiocav/followers","following_url":"https://api.github.com/users/fabiocav/following{/other_user}","gists_url":"https://api.github.com/users/fabiocav/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiocav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiocav/subscriptions","organizations_url":"https://api.github.com/users/fabiocav/orgs","repos_url":"https://api.github.com/users/fabiocav/repos","events_url":"https://api.github.com/users/fabiocav/events{/privacy}","received_events_url":"https://api.github.com/users/fabiocav/received_events","type":"User","site_admin":false},"body":"ReasAsAsync is an extension method defined in System.Net.Http.Formatting. You'd need to add that reference as well :(\r\n","created_at":"2016-03-12T05:33:19Z","updated_at":"2016-03-12T05:33:19Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30#discussion_r55916711","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/comments/55916711"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30#discussion_r55916711"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30","id":62631592,"html_url":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30","diff_url":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/30","number":30,"state":"open","locked":false,"title":"Add C# WebHook template","user":{"login":"davidebbo","id":556238,"avatar_url":"https://avatars.githubusercontent.com/u/556238?v=3","gravatar_id":"","url":"https://api.github.com/users/davidebbo","html_url":"https://github.com/davidebbo","followers_url":"https://api.github.com/users/davidebbo/followers","following_url":"https://api.github.com/users/davidebbo/following{/other_user}","gists_url":"https://api.github.com/users/davidebbo/gists{/gist_id}","starred_url":"https://api.github.com/users/davidebbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidebbo/subscriptions","organizations_url":"https://api.github.com/users/davidebbo/orgs","repos_url":"https://api.github.com/users/davidebbo/repos","events_url":"https://api.github.com/users/davidebbo/events{/privacy}","received_events_url":"https://api.github.com/users/davidebbo/received_events","type":"User","site_admin":false},"body":"That's the cleanest I could do with current runtime. Later, I'd like to find a way to directly receive the dynamic `data` as a function param instead of having to manually use json.net.","created_at":"2016-03-12T05:03:07Z","updated_at":"2016-03-12T05:33:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"070e0b6961331ea62825b43829a8912eafcabf63","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/30/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/statuses/b26bdb60c489a2b3b70816092895eed58d892d0a","head":{"label":"Azure:csharp-webhook","ref":"csharp-webhook","sha":"b26bdb60c489a2b3b70816092895eed58d892d0a","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":52470131,"name":"azure-webjobs-sdk-templates","full_name":"Azure/azure-webjobs-sdk-templates","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-templates","description":"","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/deployments","created_at":"2016-02-24T19:53:25Z","updated_at":"2016-03-09T04:50:17Z","pushed_at":"2016-03-12T05:23:40Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-templates.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-templates.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-templates.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-templates","homepage":null,"size":56,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":2,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"2e0fdd4a0f6cfdae098962967c3bf5333a2096d4","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":52470131,"name":"azure-webjobs-sdk-templates","full_name":"Azure/azure-webjobs-sdk-templates","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-templates","description":"","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/deployments","created_at":"2016-02-24T19:53:25Z","updated_at":"2016-03-09T04:50:17Z","pushed_at":"2016-03-12T05:23:40Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-templates.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-templates.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-templates.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-templates","homepage":null,"size":56,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-templates/pull/30"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/30"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-templates/statuses/b26bdb60c489a2b3b70816092895eed58d892d0a"}}}}