关于在服务管理--代理配置中访问外部链接
您好,我在服务管理--代理配置中用官网的脚本访问外部链接,总是报错,请问是什么原因呢?fetch('http://centest.1111111111.com/gateway.html', {method: 'post',
body: senParStr,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
}
}).then((res) => {
return res.json();
}).then((json) => {
console.log(`响应的json对象是:${JSON.stringify(json, null, '\t')}`);
});
报错:com.x.program.center.jaxrs.agent.ExceptionAgentExecute: agent execute error, id:e36b39ea-5f79-4083-a6e1-303fed367b1e, name:定时, message:TypeError: Access to host class java.net.URL is not allowed or does not exist.
是不是url地址不对啊 论坛管理员 发表于 2024-8-23 09:48
是不是url地址不对啊
地址没问题,报错一直是有个Java类没有。现在已经解决了。感谢大大!!!! 论坛管理员 发表于 2024-8-23 09:48
是不是url地址不对啊
还有个问题需要请教,昨天晚上我设置了外部访问接口,同样的代码,一会儿能很快的正常访问,一会儿就没反应了,这种可能是哪里的问题呢?
页:
[1]