curl - curl: (7) 连接 127.0.0.1 端口 3000 失败:连接被拒绝
问题描述
我正在尝试通过从 sam lcoal start-api 获得的 api 发布我的图像以开始调整大小。
docker exec -it test_container curl -H "Accept: image/png" -H "Content-Type: image/png" --data-binary "cat3.png" -X POST http://127.0.0.1:3000/hello -o test.png
错误是:
curl: (7) Failed to connect to 127.0.0.1 port 3000: Connection refused
期望结果是调整图像大小。但是在这里我发现了错误。有人可以在整个过程中帮助我吗?
解决方案
推荐阅读
- scala - 从 Spark 中的 Driver 访问任务进度
- ios - 如何修复 iOS 崩溃“com.apple.main-thread SIGABRT ABORT”
- mongodb - 在 Express 中哪里可以找到 Mongo Collection?
- perl - Perl 试图理解正则表达式调试输出
- android - 我可以安全地从我的 google-services.json 文件中删除除当前应用程序数据之外的所有应用程序数据吗?
- angular - Ngx 芯片填充
不发布 HTML 对象 onFocus of input - swift - MVVM 中的 Api 到业务模型的转换
- java - 尝试检索 json 节点时出现 ClassCastException
- javascript - 如何将 JS 链接到 SAP API 开发工作
- angular - 如何在angular4中分别传递标头(将json对象传递给API时不起作用)