Add example call in Curl to mod_rest

This commit is contained in:
Badlop 2019-02-11 15:39:02 +01:00
parent d1066f6644
commit bae1cdc52e
1 changed files with 11 additions and 1 deletions

View File

@ -199,7 +199,17 @@ To execute an ejabberd command, simply provide its name and arguments as in ejab
wget http://localhost:5285/rest/ --server-response --post-data 'registered_users localhost'
If you configure access_commands option, you must provide the credentials like this:
wget http://localhost:5285/rest/ --server-response --post-data '--auth user1 localhost thepass registered_users localhost'
wget http://localhost:5285/rest/ --server-response --post-data '--auth user1 localhost thepass registered_users localhost'
EXAMPLE COMMAND WITH CURL
==============================
Example call with Curl:
curl -X POST -i http://localhost:5285/rest/ -d 'create_room testroom muc.localhost localhost'
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1
EXAMPLE CALL WITH PYTHON