发送房间当前温度
POST
/api/send_current_temp/
请求参数
Body 参数application/json
room_number
integer
必需
current_temp
number <float>
必需
示例
{
"room_number": 0,
"current_temp": 0
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/send_current_temp/' \
--header 'Content-Type: application/json' \
--data-raw '{
"room_number": 0,
"current_temp": 0
}'
返回响应
🟢200成功
application/json
Body
status
integer
必需
示例值:
200
示例
{
"status": "success",
"message": "Current temperature for room 101 has been updated to 29."
}
修改于 2025-02-04 08:04:00