agent-backend/contracts/HttpExample/HttpExample.yjs

15 lines
415 B
Plaintext
Raw Permalink Normal View History

2021-09-26 04:49:24 +00:00
@Permission("Http")
@Description("这是Http请求示例")
contract HttpExample{
@Description("http get参数示例: http://www.baidu.com")
export function get(arg){
var ret = HttpUtil.httpGet(arg);
return ret;
}
@Description("http post参数示例: {\"url\":\"http://www.baidu.com\",\"data\":\"ddd\"}")
export function post(arg){
var ret = HttpUtil.httpPost(arg);
return ret;
}
}