0

如果我有路线/auth/token/:token:token我的参数在哪里,还有路线/auth/token/exchange/:code吗?

4

1 回答 1

0

是的,两条路线都有可能

var express = require('express');
var app = express();

app.get("/auth/token/exchange/:token", function(req, res) {
    res.send(req.params)
})
app.get("/auth/token/:token", function(req, res) {
    res.send(req.params)
})


app.listen(4000, function() {
    console.log("Express server listening on port 4000");
});

于 2017-08-02T09:05:48.500 回答