开发者

Is Webhooks a style/pattern or a specification?

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 callb开发者_JAVA技巧acks have no specific implementation requirements except to be an http post.

Is this correct?


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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜