详讲OneNET HTTP请求、响应报文格式

一、HTTP请求、响应报文格式

1、HTTP请求报文格式
在这里插入图片描述
2、HTTP响应报文格式
在这里插入图片描述

二、OneNET HTTP请求、响应报文格式

1、OneNET HTTP POST请求

POST /devices/505619290/datapoints HTTP/1.1
api-key:SlxhH3MCLvuuvXJ0N=a14Yo6EAQ=
Host:api.heclouds.com
Content-Length:66
 
{"datastreams":[{"id":"test_stream","datapoints":[{"value":28}]}]}

在这里插入图片描述
2、OneNET HTTP POST响应报文格式

HTTP/1.1 200 OK
Date: Mon, 19 Aug 2019 07:35:27 GMT
Content-Type: application/json
Content-Length: 26
Connection: keep-alive
Server: Apache-Coyote/1.1
Pragma: no-cache

{"errno":0,"error":"succ"}

在这里插入图片描述

三、OneNET HTTP协议的使用

https://blog.csdn.net/Sanjay_Wu/article/details/84870419

发布了54 篇原创文章 · 获赞 92 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/Sanjay_Wu/article/details/99714839