我有一个实体Temperature
。用于收集对象的RESTful URL
我的网址设计如下:
GET /api/temperatures/new
GET /api/temperatures/{id}/edit
GET /api/temperatures
POST /api/temperatures
PUT /api/temperatures/{id}
DELETE /api/monitoring/temperatures/{id}
我想一次建立多个温度(温度的集合) - 是那里的网址使用方面进行任何约定?
到目前为止,我想出了以下内容:
POST /api/monitoring/temperatures/collection
GET /api/monitoring/temperatures/cnew
我认为必须有这样的惯例已经所以想查你。
为什么不使用'POST'将温度数组发送到'/ api/temperature'端点? –