http协议

2017-03-22  本文已影响0人  fang63625

Http协议基本:

简单的GET请求

GET /v1.1/device/12825/sensor/20956/datapoints HTTP/1.1\r\n
Host: api.yeelink.net\r\n
Content-Length: 0\r\n
U-ApiKey: 121234132432143\r\n
\r\n

简单的POST请求

POST /v1.1/device/12825/sensor/20956/datapoints HTTP/1.1\r\n
Host: api.yeelink.net\r\n
Content-Length: 14\r\n
U-ApiKey: 121234132432143\r\n
\r\n
{"value":30.1}

HTTP之状态码

状态代码有三位数字组成,第一个数字定义了响应的类别,共分五种类别:

常见状态码:

上一篇下一篇

猜你喜欢

热点阅读