10.0请求接口demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1.0 KiB

demo-http-handler

10.0请求接口demo
demo生效后访问
GET http://localhost:8075/webroot/decision/plugin/public/com.tptj.demo.hg.http.handler.v10/demo/public
响应:Hello World

GET http://localhost:8075/webroot/decision/plugin/private/com.tptj.demo.hg.http.handler.v10/demo/admin
body raw = {"key":"hello","value":"测试"}
header: Authorization=Bearer $Fine_Auth_Token (注:超管的token)
响应: {"key":"hello","value":"测试"}

GET http://localhost:8075/webroot/decision/plugin/private/com.tptj.demo.hg.http.handler.v10/demo/module?key=哈哈哈
header: Authorization=Bearer $Fine_Auth_Token (注:有用户管理权限的用户token)
响应: 哈哈哈

http://localhost:8075/webroot/decision/plugin/private/com.tptj.demo.hg.http.handler.v10/demo/user
header: Authorization=Bearer $Fine_Auth_Token (注:用户名为Anna的token)
响应: {"time":"当前时间","msg":"Hello Anna!"}}

对于需要token的请求,如果没有正确的token,则会返回登录页面或提示无权限的页面