i trying make rest requests (without oauth) ejabberd response "http/1.1 400 bad request"
here detail:
ejabberd version: 16.02
ejabberd configuration
port: 5280 ip: "::" module: ejabberd_http request_handlers: ##"/websocket": ejabberd_http_ws ##"/oauth": ejabberd_oauth "/api": mod_http_api ## "/pub/archive": mod_http_fileserver web_admin: true http_bind: true http_poll: true ## register: true captcha: false commands_admin_access: configure commands: - add_commands: user oauth_expire: 3600 oauth_access:
request
curl -v -x post -h "x-admin: true" -h "authorization: basic ywrtaw5achjqlmlvomfkbwlu" -h "content-type:application/json" http://prj.io:5280/api/status -d '{}'
logs
2016-03-26 04:38:04.711 [debug] <0.490.0>@ejabberd_http:process_header:281 (#port<0.16265>) http query: 'post' <<"/api/status">> 2016-03-26 04:38:04.711 [debug] <0.490.0>@ejabberd_http:extract_path_query:395 client data: <<"{}">> 2016-03-26 04:38:04.711 [debug] <0.490.0>@ejabberd_http:process:353 [<<"api">>,<<"status">>] matches [<<"api">>] 2016-03-26 04:38:04.711 [info] <0.490.0>@mod_http_api:log:388 admin call status [] ::ffff:192.168.117.1:53583
please me out understand ejabberd's behaviour , way post requests mod_http_api
.
try below ...
commands_admin_access: configure commands: - add_commands: - status
Comments
Post a Comment