2 summary: 'Receives HTTP POST request, parses it and relays it into XMPP.'
8 Sometimes it's useful to have different interfaces to access XMPP.
10 This module allows sending XMPP
11 [`<message>`](https://xmpp.org/rfcs/rfc6121.html#message) stanzas via a
17 curl http://example.com:5280/msg/user -u me@example.com:mypassword -H "Content-Type: text/plain" -d "Server@host has just crashed!"
19 This would send a message to user\@example.com from me\@example.com
27 /msg/ [recipient [@host] ].
29 The base URL defaults to `/msg`. This can be configured via Prosodys
30 [HTTP path settings][doc:http].
35 Authentication is done by HTTP Basic.
37 Authentication: Basic BASE64( "username@virtualhost:password" )
42 Supported formats are:
45 : The HTTP body is used as plain text message payload, in the `<body>`
48 `application/x-www-form-urlencoded`
49 : Allows more fields to be specified.
52 : Similar to form data.
54 Which one is selected via the `Content-Type` HTTP header.
58 The form data and JSON formats allow the following fields:
61 : Can be used instead of having the receiver in the URL.
64 : [Message type.](https://xmpp.org/rfcs/rfc6121.html#message-syntax-type)
67 : Plain text message payload which goes in the `<body>` element.
72 Some code originally borrowed from mod\_webpresence