普通版
如:
增 : http://localhost:3000/shopcar/add
删 : http://localhost:3000/shopcar/del
改 : http://localhost:3000/shopcar/update
查 : http://localhost:3000/shopcar/search
高级版
如:
接口只有一个,但是请求方式【 7个 】多个
增 : http://localhost:3000/shopcar post请求
删 : http://localhost:3000/shopcar delete请求
改 : http://localhost:3000/shopcar put请求
查 : http://localhost:3000/shopcar get请求
--------------------------------------------------------------------------------------------------------------------------
put和delete会自动携带 请求 options 请求
上面这种规则就是 restful api
restful api就是接口暴露的规则