邮递员连接 ECONNREFUSED 127.0.0.1:8080

lai*_*ila 1 api postman

尝试测试 API 端点并收到此错误。可以是我的请求体吗?还是网络问题?也许我需要在代理设置中更改某些内容?

POST http://localhost:8080/v1/collections
Error: connect ECONNREFUSED 127.0.0.1:8080
Proxy
authenticate: false
disabled: false
host: "127.0.0.1"
id: "smth"
match: {…}
port: 8080
tunnel: false
Request Headers
Test: check-headers
x-ads-token-data: {stuff}
x-ads-gateway-secret: test1
Content-Type: application/json
User-Agent: PostmanRuntime/7.26.5
Accept: */*
Postman-Token: xxxx
Host: localhost:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Run Code Online (Sandbox Code Playgroud)

rag*_*hes 6

econnrefused 意味着很可能您还没有在端口 8080 上启动服务器。

这里查看 nodejs 文档

ECONNREFUSED(连接被拒绝):无法建立连接,因为目标机器主动拒绝它。这通常是由于尝试连接到在外部主机上处于非活动状态的服务所致。