On Sun, 21 Feb 2021 at 07:55, Daniel Gultsch <[email protected]> wrote:

> On Sat, Feb 20, 2021 at 8:56 PM Kim Alvefur <[email protected]> wrote:
>
> > # "REST" stanza API
> >
> > Started as an experiment combining new code for keeping track of IQ
> > stanzas using ES6 Promises, combined with support in the Prosody HTTP
> > stack for promises, which let you send a HTTP request with an IQ stanza
> > which would wait and return the response.
> >
> > I found this quite fascinating, being able to query remote servers
> > via curl. It also gained a reverse "webhook" mode, where incoming
> > stanzas gets forwarded to a local web service, as a way to build bots or
> > components using web tech. The responding service can then reply by
> > returning a stanza in the http response, or return an empty response and
> > then send something later using the previously mentioned API.
> >
> > Because web tech must be based on JSON, mod_rest grew a limited JSON
> > representation of some common stanza payloads, as well as support for
> > some other payload formats, e.g. plain text.
> >
> > So you can build the Hello World echo bot by pointing this module at a
> > plain text file on a web server. I think that's kinda neat.
> >
> > In theory this could be used as an alternative to BOSH in the future,
> > but a few pieces are missing.
> >
> > There is also OAuth2 token authentication, which we might see more of in
> > other parts of Prosody in the future. Stay tuned!
>
>
> I’m unfortunately under NDA so I can’t be too specific about the
> details but I've also implemented a "Bot API" where you can POST
> messages with JSON and receive messages via a webhook. The thing I
> implemented transparently takes care of OMEMO meaning messages are
> encrypted on the XMPP side but unencrypted on the HTTP side. (Meaning
> the bot developer doesn’t have to worry about it.)
>
> Just thought it was interesting that these things keep popping up. As
> much as we love XMPP and XML there is apparently a demand for
> something "simpler".
>

I threw a suggestion out on the wind year ago for building a standardized
webhook/"integration" API - really so that things like GitHub (and
basically, everything that offers Slack integrations) could also hit XMPP.
Maybe it's time to revisit that? And maybe this time I'll follow through? I
certainly let that ball drop (if I even *tried* to catch it) last time.

Dave.
_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________

Reply via email to