24

I've been reading about Webhooks and I'm trying to determine if it's a specification vs a style/pattern.

By "specification" I mean that the implementation details, e.g. headers, payload and so on are well defined. By "style" or "pattern" I mean in the sense that REST is a style (as opposed to a spec) or a pattern which describes usage but doesn't define implementation details.

From what I see, Webhooks is a style/pattern. That the event(s) which triggers the http callbacks are generated however the developer wants, and that the http callbacks have no specific implementation requirements except to be an http post.

Is this correct?

Emilio
  • 1,951
  • 3
  • 18
  • 24

2 Answers2

27

Correct. You'll find different implementations of this style, e.g. with differences in the content (format) of the HTTP callback request and the URL 'receiving' the callback. In a RESTful style, the callback will be a HTTP POST, but the representation that is transferred can be as variable as your imagination.

I think you've seen the WebHooks workspace, describing the concept clearly. That page mentions:

No Specs?! While there are currently no standards defined for WebHooks, there are groups working to define guidelines that may one day evolve into standards. Each of these standards should apply to different types of needs, or lighter vs comprehensive implementations.

This page has more information on a subset of WebHooks, being RESTful WebHooks.

Felipe Sabino
  • 17,825
  • 6
  • 78
  • 112
Jochem Schulenklopper
  • 6,452
  • 4
  • 44
  • 62
  • Thank you! I actually hadn't seen those pages. I'm checking them out now. Thanks again. – Emilio May 31 '10 at 23:12
  • 1
    Just read something that made me update this answer with more details. "Web hook" seems to be coined by Jeff Lindsay, with a nice introduction at http://progrium.com/blog/2007/05/03/web-hooks-to-revolutionize-the-web/. The crux is in "Web hooks are essentially user defined callbacks made with HTTP POST. To support web hooks, you allow the user to specify a URL where your application will post to and on what events. Now your application is pushing data out wherever your users want." – Jochem Schulenklopper Aug 14 '14 at 12:29
0

You can also look at the OpenID Foundation's Shared Signals and Events working group specifications, which is a standard for secure webhooks:

https://openid.net/wg/sse/

atul
  • 93
  • 1
  • 1
  • 8