javascript - Postman Cloud Agent Error: Can not send requests to localhost. Select a different agent - Stack Overflow

In postman web version When I send a request using getlocalhost:8080 it's just giving an arror.

In postman web version When I send a request using get localhost:8080 it's just giving an arror. Cloud Agent Error: Can not send requests to localhost. Select a different agent. Please help me about the situation. Is there any problem with my Vs codes ?

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");
});

In postman web version When I send a request using get localhost:8080 it's just giving an arror. Cloud Agent Error: Can not send requests to localhost. Select a different agent. Please help me about the situation. Is there any problem with my Vs codes ?

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");
});

Share Improve this question asked Dec 30, 2021 at 13:03 Ömer KoçarÖmer Koçar 131 gold badge1 silver badge4 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 1

The Cloud Agent runs in the Cloud.

"Cloud" is a buzzword loosely meaning someone else's puter.

Their puter cannot access services running on your private loopback network interface (i.e. localhost).

If you want the Cloud Agent to access your service then you need to host it on the public Internet.

I encountered a similar error, I had to download and install postman on my local machine instead of using Postman web and it worked fine.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745119022a4612304.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信