Mercurial > prosody-modules
comparison mod_rest/README.markdown @ 4478:7ab0c423688a
mod_rest: Support GET for certain IQ queries
Example:
GET /rest/version/example.com
200 OK
{ version: { name: "thing", version: "1.0.0" } }
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Feb 2021 19:33:09 +0100 |
parents | 8df6cc648963 |
children | 508cb880b163 |
comparison
equal
deleted
inserted
replaced
4477:8df6cc648963 | 4478:7ab0c423688a |
---|---|
98 | 98 |
99 Replies to other kinds of stanzas that are generated by the same Prosody | 99 Replies to other kinds of stanzas that are generated by the same Prosody |
100 instance *MAY* be returned in the HTTP response. Replies from other | 100 instance *MAY* be returned in the HTTP response. Replies from other |
101 entities (connected clients or remote servers) will not be returned, but | 101 entities (connected clients or remote servers) will not be returned, but |
102 can be forwarded via the callback API described in the next section. | 102 can be forwarded via the callback API described in the next section. |
103 | |
104 ### Simple info queries | |
105 | |
106 A subset of IQ stanzas can be sent as simple GET requests | |
107 | |
108 ``` | |
109 curl https://prosody.example:5281/rest/version/example.com \ | |
110 --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ | |
111 -H 'Accept: application/json' | |
112 ``` | |
113 | |
114 The supported queries are | |
115 | |
116 - `disco` | |
117 - `items` | |
118 - `version` | |
119 - `ping` | |
103 | 120 |
104 ## Receiving stanzas | 121 ## Receiving stanzas |
105 | 122 |
106 TL;DR: Set this webhook callback URL, get XML `POST`-ed there. | 123 TL;DR: Set this webhook callback URL, get XML `POST`-ed there. |
107 | 124 |