javascript - 无法访问我的本地服务器,标题有问题吗?
问题描述
我想获取特定“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
);
解决方案
推荐阅读
- python - timeit 和它的 default_timer 完全不同意
- javascript - 请求的模块不提供名为
- java - 遇到换行符时无法反序列化标签内的空内容
- javascript - Ramda - 将数组中对象的重复项与相同的键值组合起来
- android - 如何使用电容器最小化离子应用程序
- flutter - 如何在颤振中绕过画板(Rive)
- asp.net - asp.net登录问题
- java - spring 中是否有一种模式允许在多个服务中使用来自远程服务器的数据而无需多次请求?
- python - 当它们共享一个列值时,有没有办法将数据压缩到 Pandas DataFrame 的一行中?
- python - 如何防止文本内的小部件超出边界?特金特