http://1217.0.0.1:30000/:id?user_name=‘kk’
1、req.params
一般用于get, URL中’?'之前的参数用req.params去接收。
2、req.query
一般用于get, URL中’?'之后的参数用req.query去接收。
3、req.body
一般用于post,put,非URL中的参数用req.body去接收。
注:在后端表现为:/:id
,在URL中表现为/id
学习链接:https://blog.csdn.net/q1312882392/article/details/93875905