【发布时间】:2017-10-27 10:25:07
【问题描述】:
我已经写了这段代码:
doIt(evt) {
axios.get('/book', {
params: {
id: 1
}
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
我想得到 id = 1 的书
我正在使用在 nginx 中运行的服务器。 我不知道如何在服务器中接收此请求以及如何将响应发送给我的客户端。 请帮帮我。
【问题讨论】:
-
嗨!如果您签出代码中的How to create a Minimal, Complete, and Verifiable example 以备将来在堆栈溢出时使用会更好。 -谢谢
-
@Momin 你能帮帮我吗??
-
你的后端服务器是什么来处理这个请求?你在用 NodeJS 还是什么的?
-
我正在使用 nodejs
标签: javascript rest nginx axios