我有一個實體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'端點? –