Postman 云代理错误:无法向本地主机发送请求,选择不同的代理

csbfibhn  于 2022-10-02  发布在  Java
关注(0)|答案(2)|浏览(513)

在 Postman 网页版本中,当我使用Get localhost:8080发送请求时,它只是给出了一个错误。请给我讲讲情况。我的VS代码有问题吗?

const express = require("express");
const app = express();

/* app.use((req, res)=> {
}); */

app.get("/", (req, res) => {
  res.send("This is the home page");
});

app.get("/cats", (req, res) => {
  res.send("MEOW");
});

app.get("/dogs", (req, res) => {
  res.send("woof");
});

app.post("dogs", (req, res) => {
  res.send("Post request to /cats. This is diffrent than get");
});

app.get("*", (req, res) => {
  res.send("I don't know what that path");
});

app.listen(8080, () => {
  console.log("Listening on port 8080");
});
5hcedyr0

5hcedyr01#

云代理运行在云中

“云”是一个流行语,大致意思是别人的电脑

他们的计算机无法访问您的专用环回网络接口(即localhost)上运行的服务。

如果您希望云代理访问您的服务,则需要将其托管在公共互联网上。

qoefvg9y

qoefvg9y2#

我遇到了一个类似的错误,我不得不下载并在我的本地机器上安装 Postman ,而不是使用 Postman 网络,它工作得很好。

相关问题