天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 3013|回复: 1

HTTP工具

[复制链接]
admin 发表于 2023-9-15 16:49:47 | 显示全部楼层 |阅读模式
1、(static) httpGet(url, params) → {Java.JSONObject}        请求接口(get)
示例:

(function(){
var url = "http://localhost:8080/signon/actuator/health";
var result = HTTP.httpGet(url);
getCurrentDocument().findItem("结果1").setValue(result);
})()


2、(static) httpPost(url, params) → {Java.JSONObject}        请求接口(post)
示例:

(function(){
var url = "http://localhost:8080/signon/api/runtime/login/getDomainList";
var result = HTTP.httpPost(url, null);
getCurrentDocument().findItem("结果2").setValue(result);
})()
caib988388 发表于 2024-9-5 16:35:02 | 显示全部楼层
按照上面方法,提示"HTTP" is not defined.怎么回事?

Field:test-值脚本出错 <br>JavaScriptRunning:[Form.test1.Field(__n3v8hXTYPHliJoxopxT).test.ValueScript]: ReferenceError: "HTTP" is not defined. (__n3v8hXTYPHliJoxopxT).test.ValueScript#13)

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 07:32

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表