diff options
author | Pouriya <pouriya.jahanbakhsh@gmail.com> | 2021-09-18 16:09:11 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 16:09:11 +0430 |
commit | 3eb795357ff2278fa641608f442c9800d74c9c0a (patch) | |
tree | 9592f786ad76e91b442fcf9a83cdd609ede3a9c2 /src/mod_http_api.erl | |
parent | ref: fix WS typos (diff) | |
parent | Fix previous commit: add forgotten endline blankspaces (diff) |
Merge branch 'processone:master' into master
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r-- | src/mod_http_api.erl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index 0a3942024..427833584 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -527,10 +527,20 @@ mod_doc() -> [?T("This module provides a ReST API to call ejabberd commands " "using JSON data."), "", ?T("To use this module, in addition to adding it to the 'modules' " - "section, you must also add it to 'request_handlers' of some " - "listener."), "", + "section, you must also enable it in 'listen' -> 'ejabberd_http' -> " + "http://../listen-options/#request-handlers[request_handlers]."), "", ?T("To use a specific API version N, when defining the URL path " "in the request_handlers, add a 'vN'. " "For example: '/api/v2: mod_http_api'"), "", ?T("To run a command, send a POST request to the corresponding " - "URL: 'http://localhost:5280/api/<command_name>'")]}. + "URL: 'http://localhost:5280/api/<command_name>'")], + example => + ["listen:", + " -", + " port: 5280", + " module: ejabberd_http", + " request_handlers:", + " /api: mod_http_api", + "", + "modules:", + " mod_http_api: {}"]}. |