X-Callback Header: Evented Web Building Block by @progrium

The X-Callback header is a proposal for a common way to describe HTTP callbacks, primarily in the case of registering them.

Great proposal from my former Twilio colleague Jeff Lindsay for instructing a server to respond to an HTTP request via a callback instead of a synchronous response.

A couple of tweaks I would suggest:

  • Rename the header name to Callback-Location (or something). X- prefixed headers are being discouraged these days.
    • Use a 2xx class response code to indicate that the request was received and the callback registered. The current definitions of 200-206 don’t fit well enough for my liking.

Jeff is working on advancing the state of Webhooks into something more standard-like, so his blog is definitely one you’ll want to keep an eye on.