zoukankan      html  css  js  c++  java
  • SIM7500 SIM7600 SIM800 HTTP

    解释

    //Start HTTP service
    AT+HTTPINIT
    
    //Stop HTTP service
    AT+HTTPTERM
    
    //Set HTTP Parameters value
    /*
    <tag>
    HTTP parameters:
    "URL" (Mandatory Parameter) HTTP client URL
    "http://'server'/'path':'tcpPort' " "server": FQDN or IP-address "path": path of file or directory
    "tcpPort": default value is 80. Refer to "IETF-RFC 2616".
    <value>
    String
    */
    AT+HTTPPARA=<tag>,<vaule>
    
    //HTTP Method Action
    /*
    <method>
    HTTP method specification:
    0: GET
    1: POST
    2: HEAD
    <statuscode>
    HTTP Status Code responded by remote server, it identifier refer to HTTP1.1(RFC2616) :
    100 Continue
    101 Switching Protocols
    200 OK
    201 Created
    202 Accepted
    203 Non-Authoritative Information
    204 No Content
    205 Reset Content
    206 Partial Content
    300 Multiple Choices
    301 Moved Permanently
    302 Found
    303 See Other
    304 Not Modified
    305 Use Proxy
    307 Temporary Redirect
    400 Bad Request
    401 Unauthorized
    402 Payment Required
    403 Forbidden
    404 Not Found
    405 Method Not Allowed
    406 Not Acceptable
    407 Proxy Authentication Required
    408 Request Time-out
    409 Conflict
    410 Gone
    411 Length Required
    412 Precondition Failed
    413 Request Entity Too Large
    414 Request-URI Too Large
    415 Unsupported Media Type
    416 Requested range not satisfiable
    417 Expectation Failed
    500 Internal Server Error
    501 Not Implemented
    502 Bad Gateway
    503 Service Unavailable
    504 Gateway Time-out
    505 HTTP Version not supported
    600 Not HTTP PDU
    601 Network Error
    602 No memory
    603 DNS Error
    604 Stack Busy
    <datalen>
    The length of data received
    */
    AT+HTTPACTION=<method>
    
    //Read the HTTP Header Information of Server Response
    AT+HTTPHEAD
    
    //Read the HTTP server response
    /*
    <start_addr>
    The starting point for data output.
    <byte_size>
    The length for data output
    <data>
    Data from HTTP server or user input
    */
    AT+HTTPREAD=<start_addr>,<byte_size>

    实例

    AT+HTTPINIT //初始化HTTP
    
    OK
    
    AT+HTTPPARA="URL","http://cloud.test.cn"    //设置URL参数
    
    OK
    
    AT+HTTPPARA="CONTENT","application/x-www-form-urlencoded"   //设置CONTENT参数
    
    OK
    
    AT+HTTPDATA=4,4000  //设置数据长度
    
    DOWNLOAD
    data    //数据
    1A<Ctrl+Z>  //发送结束
    OK
    
    AT+HTTPACTION=1 //POST
    
    OK
    
    
    +HTTPACTION: 1, 200, 11
    
    AT+HTTPREAD=0,512   //读取返回数据
    
    +HTTPREAD: 11
    
    AT+HTTPTERM //结束HTTP
    
    OK
  • 相关阅读:
    Record of coding:Codeforces 1093E
    【刷题记录】网络流24题等
    【模板归纳】网络流及费用流
    【刷题记录】BZOJ2154 crash的数字表格 莫比乌斯反演
    【刷题记录】SDOI2017数字表格
    算法总结 给定范围内最大公约数为某一定值的数对个数的算法
    刷题记录【BZOJ2440 完全平方数】数论、组合数学、莫比乌斯函数
    刷题记录 【HAOI2007】理想的正方形 二维st表
    刷题记录【ZJOJ2005午餐】,贪心+DP或者
    刷题记录【ZJOI2007棋盘制作】二维DP,悬线法。。。
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/11709483.html
Copyright © 2011-2022 走看看