更新时间:2022-08-25 GMT+08:00
分享

登出

应用场景

用户需要退出到登录页面

前提条件

已完成登录认证。

接口概述

用户退出登录。

请求URL

/action.cgi?ActionID=WEB_Logout

 private static void Logout() {
        String uri = baseUrl + "/action.cgi?ActionID=WEB_Logout";
        obj = new JSONObject();
        obj.put("acCSRFToken", token);
        JSONObject result = HttpClientUtil.post(uri, obj, null);
        try {
            systemPrint("result_logout:"+result);
        } catch (Exception e) {
             systemPrint("failed");
        }
    }

main函数调用

public static void main(String[] args) {

args = new String[]{"Logout","api","Change_Me"};

stringHashMap配置

stringHashMap.put("Logout", "Logout");

token的值为上述login操作获取的值,登出成功返回报文

{"success":1,"data":""}

分享:

    相关文档

    相关产品