我想使用Express发送AJAX请求。我运行的代码如下所示:我如何使用Express框架制作AJAX请求?
var express = require('express');
var app = express();
app.get('/', function(req, res) {
// here I would like to make an external
// request to another server
});
app.listen(3000);
我该怎么做?
文档:https://开头的NodeJS .org/api/http.html#http_http_request_options_callback – mauronet