Software / code / prosody-modules
Comparison
mod_post_msg/README.markdown @ 2984:1e7d221bba8d
mod_post_msg/README: Document the payload formats
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 04 Apr 2018 15:44:29 +0200 |
| parent | 2983:fa3665b7602f |
| child | 2985:7467509abdbb |
comparison
equal
deleted
inserted
replaced
| 2983:fa3665b7602f | 2984:1e7d221bba8d |
|---|---|
| 15 | 15 |
| 16 curl http://example.com:5280/msg/user -u me@example.com:mypassword -H "Content-Type: text/plain" -d "Server@host has just crashed!" | 16 curl http://example.com:5280/msg/user -u me@example.com:mypassword -H "Content-Type: text/plain" -d "Server@host has just crashed!" |
| 17 | 17 |
| 18 This would send a message to user\@example.com from me\@example.com | 18 This would send a message to user\@example.com from me\@example.com |
| 19 | 19 |
| 20 Details | |
| 21 ======= | |
| 22 | |
| 23 Payload formats | |
| 24 --------------- | |
| 25 | |
| 26 Supported formats are: | |
| 27 | |
| 28 `text/plain` | |
| 29 : The HTTP body is used as message `<body>`. | |
| 30 | |
| 31 `application/x-www-form-urlencoded` | |
| 32 : Allows more fields to be specified. | |
| 33 | |
| 34 ### Data fields | |
| 35 | |
| 36 The form data format allow the following fields: | |
| 37 | |
| 38 `to` | |
| 39 : Can be used instead of having the receiver in the URL. | |
| 40 | |
| 41 `type` | |
| 42 : [Message type.](https://xmpp.org/rfcs/rfc6121.html#message-syntax-type) | |
| 43 | |
| 44 `body` | |
| 45 : Plain text message payload. | |
| 46 | |
| 20 Acknowledgements | 47 Acknowledgements |
| 21 ---------------- | 48 ---------------- |
| 22 | 49 |
| 23 Some code originally borrowed from mod\_webpresence | 50 Some code originally borrowed from mod\_webpresence |