From bae1cdc52ef052ebff443c76ee8692776d768039 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 11 Feb 2019 15:39:02 +0100 Subject: [PATCH] Add example call in Curl to mod_rest --- mod_rest/README.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mod_rest/README.txt b/mod_rest/README.txt index 0a90aa7..e3e4796 100644 --- a/mod_rest/README.txt +++ b/mod_rest/README.txt @@ -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