hugh
8a674bc2cf
|
4 years ago | |
---|---|---|
lib | 4 years ago | |
src/main/java/com/tptj/demo/hg/http/handler | 4 years ago | |
README.md | 4 years ago | |
build.gradle | 4 years ago | |
encrypt.xml | 4 years ago | |
plugin.xml | 4 years ago |
README.md
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,则会返回登录页面或提示无权限的页面