这两个 HTTP Get 定义有什么区别?

What is the difference between these 2 HTTP Get definitions?

我正在使用 Node.js Restify。

这两种在服务器端定义 HTTP Get 请求的方式有什么区别?它将如何影响客户端 URL 调用 GET API 并检索 URL 参数?

第一个。

server.get('/echo', function (req, res, next) 
{
}

第二个

server.get('/echo/:message', function (req, res, next)
{
}

第一个是使用“/echo”或“/echo/”路径接受请求的简单路由。

第二个有一个命名参数。这意味着您可以使用“/echo/xxx”路径通过

访问请求中传递的值
req.params.message