agent-backend/contracts/HttpExample/HttpExample.yjs
2021-09-26 12:49:24 +08:00

15 lines
415 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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;
}
}