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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!