// POST https://api.xxx.com/v1/devices/001/data
// Header: Authorization: Bearer <token>
// Body: {"temp":26.5,"humi":60.2}
char body[96];
snprintf(body, sizeof(body),
"{"temp":%.1f,"humi":%.1f}", temp, humi);
http_client_req_t req = {
.method = POST, .url = "/v1/devices/001/data",
.host = "api.xxx.com", .port = 443,
.auth = "Bearer eyJhbGci...",
.body = body, .body_len = strlen(body)
};
int code = http_client_send(&req); // 期望 200/201