首页 > 解决方案 > 无法访问我的本地服务器,标题有问题吗?

问题描述

我想获取特定“chatid”的所有“nodeIds”,但我无法访问我的本地服务器。

我是否需要生成一个令牌才能访问我的本地服务器,或者您能找出任何其他错误吗?感谢您的帮助。

const config = {
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Content-Type": "application/json",
    },
  };

  const fetchNodeId = async (chatid) => {
    try {
      const res = await axios.get(
        `https://localhost:4001/api/chatbots/${chatid}/nodeid`,
        //`https://mybot.uber.space/api/chatbots/${chatid}`
        //`https://sandbox.as.wiwi.uni-goettingen.de/teachr/chatbots/pin/${pin}`
        config
      );

标签: javascriptserverlocalhostchatbot

解决方案


推荐阅读