0
A
回答
0
见https://expressjs.com/en/guide/routing.html
查询字符串不是的一部分路线路径。
如果你想使用的查询字符串,使用req.query
:
app.get('/search', function (req, res) {
console.log(req.query);
});
0
你想要什么或者是路由参数:
app.get('/foo/:bar', (req, res) => { //GET /foo/helloworld
console.log(req.params.bar); //helloworld
//...
});
或GET参数:
app.get('/foo', (req, res) => { //GET /foo?bar=helloworld
console.log(req.query.bar); //helloworld
//...
});
你现在正在做的是m让他们兴奋起来,这不起作用。
相关问题
- 1. Spree API中的Taxon查询
- 2. 在Go中查询Magento API
- 3. web api:检查odata查询
- 4. Django查询api:复杂子查询
- 5. Fusion Table API查询
- 6. QuickBooks API - 查询SalesItemLineDetail
- 7. 缺少API查询?
- 8. 查询阻塞CORS的API
- 9. Elasticsearch的Java API查询
- 10. 单个API中的多个查询
- 11. 使用Google Fusion Tables中的查询API
- 12. 子查询中休眠的标准API
- 13. 查询SharePoint ClientObjectModel中的文件API
- 14. VSTS Rest API对Powershell中链接工作项的API查询
- 15. 在Saxon api中插入查询
- 16. 如何在web api中缓存查询?
- 17. 报价查询在eTrade api中失败
- 18. 在Google中查询时未使用API
- 19. 在javascript中获取twitter-api url查询
- 20. 如何在Android中查询api?
- 21. 在rails中查询多条记录API
- 22. 不能与Parse.com API查询
- 23. Google可视化API查询
- 24. 查询Web服务API
- 25. 密码散列API查询
- 26. SOQL查询与Socrata API
- 27. TFS API C#查询语法
- 28. Expressjs:搜索查询api
- 29. 股票代码查询API
- 30. 使用node.js查询JSON API
'?'后面的文本可能不被路由器视为URL的一部分。 – wroniasty