BT

Microsoft Releases ASP.NET WebHooks Preview

| by Pierre-Luc Maheu Follow 4 Followers on Nov 11, 2015. Estimated reading time: 2 minutes |

Microsoft recently released ASP.NET WebHooks preview, a library to create and consume webhooks. WebHooks supports MVC 5 and WebApi 2.

Webhook is a pattern for user-defined callbacks using HTTP. A client can subscribe to events of his choice and receive events, in the form of POST requests, when they happen. A key point of webhooks is that they use HTTP, meaning they do not require new infrastructure to use or implement them.

ASP.NET WebHooks provides building blocks for both send and receive operations. On the receiving side, it provides a common model for receiving and processing events from webhook providers. On the sending side, it provides support for managing subscriptions and sending events.

InfoQ reached out with Henrik F Nielsen and Brady Gaster, from the ASP.NET team at Microsoft, to get more details.

InfoQ: What are the motivations behind the ASP.NET WebHooks project?

There are really two motivations for ASP.NET WebHooks:

1)      WebHooks provides a protocol pattern for integrating HTTP services enabling a very simple event notification model in the form of HTTP requests. By subscribing for a webhook you can follow updates in some other service and get notifications when things change. This enables a large amount of integration scenarios where you suddenly can interact with other services, know when things change, and then act accordingly. Integrations can include anything ranging from a file being added to Dropbox, an issue opened in Trello, a payment initiated in PayPal. As more and more expose WebHooks the opportunities grow exponentially.

2)      Even though the pattern is simple, there are some basic housekeeping rules that need to be handled. This includes security models, data formats, and variations over the same basic pattern. The trick is that most WebHook providers handle these housekeeping rules slightly differently. They are kind of like snowflakes, very similar but unique in some way. The purpose of ASP.NET WebHooks is to handle all the tedious stuff, provide a uniform user model, and allow users to get right to the task of enabling great integrations between services.

InfoQ: Are there any restrictions regarding the senders, given there is no established protocol for webhooks beside HTTP? Is WebHooks (as a reveiver) automatically compatible with any service exposing webhooks?

HN: Out of the box we provide support for a variety of WebHooks from services such as Azure Alerts, BitBucket, Dropbox, GitHub, Kudu, Instagram, MailChimp, PayPal, Pusher, Salesforce, Slack, Stripe, Trello, and WordPress but it’s easy to add support for other providers as well and the list is rapidly growing. In fact, support for Kudu and BitBucket was added through pull requests from the community and we have additional providers on the way.

InfoQ: What is the roadmap of WebHooks up to its official release?

HN: We don’t have anything official to state about the official release just yet but we really enjoy the feedback and contributions we are getting from the community in the form of pull requests and suggestions.

BG: We’ve heard from our community that one thing they’d love to see is the ability to debug – as in “locally” – their WebHooks’ ability to receive messages. They like the idea of remote debugging, but they love the prospect of being able to “F5” their project and send WebHooks to it. We are currently prototyping some ideas to bring this feature to Visual Studio.

ASP.NET WebHooks is an open source project available on GitHub.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT