我需要从运行我的React的同一台服务器加载异步,但是这不起作用(如果我从远程设置路径它工作),错误是Invalid URI
:
request.get('statefulsetv.yaml', function (error, response, body) {
console.log(error);
if (!error && response.statusCode == 200) {
var data = yaml.load(body);
// console.log(data);
containers = data.spec.template.spec.containers;
self.setState({ containers_state: containers });
// Continue with your processing here.
}
});