• CoAP协议:CoAPCLI模拟CoAP客户端请求


    以下截图中两部分分别是GET和POST请求的格式:

    上图内容是通过虚拟机访问本地主机运行的CoAP服务,CoAP协议的默认端口为5683,这里的IP地址为本地主机的ip,通过‘ipconfig’命令可以在cmd中查询得到。

    【附:CoAP协议响应码及含义】

       +------+------------------------------+-----------+ 
       | Code | Description                  | Reference |
       +------+------------------------------+-----------+
       | 2.01 | Created                      | [RFC7252] | 
       | 2.02 | Deleted                      | [RFC7252] |
       | 2.03 | Valid                        | [RFC7252] |
       | 2.04 | Changed                      | [RFC7252] |
       | 2.05 | Content                      | [RFC7252] |
       | 4.00 | Bad Request                  | [RFC7252] |
       | 4.01 | Unauthorized                 | [RFC7252] | 
       | 4.02 | Bad Option                   | [RFC7252] |
       | 4.03 | Forbidden                    | [RFC7252] | 
       | 4.04 | Not Found                    | [RFC7252] | 
       | 4.05 | Method Not Allowed           | [RFC7252] | 
       | 4.06 | Not Acceptable               | [RFC7252] | 
       | 4.12 | Precondition Failed          | [RFC7252] | 
       | 4.13 | Request Entity Too Large     | [RFC7252] |  
       | 4.15 | Unsupported Content-Format   | [RFC7252] |  
       | 5.00 | Internal Server Error        | [RFC7252] |
       | 5.01 | Not Implemented              | [RFC7252] | 
       | 5.02 | Bad Gateway                  | [RFC7252] |  
       | 5.03 | Service Unavailable          | [RFC7252] | 
       | 5.04 | Gateway Timeout              | [RFC7252] | 
       | 5.05 | Proxying Not Supported       | [RFC7252] | 
       +------+------------------------------+-----------+ 

     (响应码3.00-3.31是预留给未来使用的)

  • 相关阅读:
    Exceptionless in Docker on Linux 搭建及部署疑难杂症
    Golang 基础语法介绍及对比(二)
    Go Windows 环境安装及配置(一)
    ElasticSearch搜索解析
    ElasticSearch文档及分布式文档存储
    ElasticSearch利用IK实现全文搜索
    ElasticSearch简要总览
    轻松驾驭统计学——数据分析必备技能
    【面试】数据分析常见问题
    【Echarts】
  • 原文地址:https://www.cnblogs.com/skzxc/p/15885922.html
Copyright © 2020-2023  润新知