Javascript JS wait fetch=>;[对象响应]

Javascript JS wait fetch=>;[对象响应],javascript,Javascript,我有一个问题: 一个API(Blynk.cc)有两个输出选项:TRUE或FALSE(简单文本,无JSON) 当遇到https://ip:port/APIKey/isHardwareConnected 我真的是假的 当我尝试使用:response=wait fetch(url)获取此结果时 打印的响应[对象响应]不正确或错误。 你能帮助我吗? 谢谢如果以他们的为例,我会帮得更好,但你可以试试这个。 您需要在响应时运行.text()函数 fetch('http://example.com/movi

我有一个问题: 一个API(Blynk.cc)有两个输出选项:TRUE或FALSE(简单文本,无JSON) 当遇到https://ip:port/APIKey/isHardwareConnected 我真的是假的 当我尝试使用:response=wait fetch(url)获取此结果时 打印的响应[对象响应]不正确或错误。 你能帮助我吗?
谢谢

如果以他们的为例,我会帮得更好,但你可以试试这个。 您需要在响应时运行.text()函数

 fetch('http://example.com/movies.json')
  .then(response => response.text())
  .then(data => console.log(data));
你的回答

const energielive = 'http://cristianistrate.go.ro:8080/oF3rMGDvjOrWLppZfgS9pqgulWyforSn/isHardwareConnected';
      let response = await fetch(energielive).then(response => response.text());
      console.log(response);

请参阅-您可能需要
response.json()
response.text()
以获得您想要的输出,而不是energielive='cristianistrate.go.ro:8080/of 3rmgdvjorwlppzfgs9pqgulwyforsn/;让response=wait-fetch(energielive)。然后(response=>response.text());