페이지 선택
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in pages

HTTP/HTTPS 통신연습 → POST Request

The following commands show how to send an HTTP POST request to the server, and how to read HTTP response.

 

 

 

1. HTTP-POST 명령시퀀스

 

NO Command Response 설명
1 PDP Context 설정    
2 AT+HTTPINIT OK

(1) PDP Context 활성화

(2) HTTP Service 시작

3

AT+HTTPPARA=”URL”,

“http://httpbin.org/post”

OK Set an URL to be accessed for HTTP

AT+HTTPPARA=”URL”,

“https://httpbin.org/post”

OK Set an URL to be accessed for HTTPS
4.1 AT+HTTPDATA=11,1000 DOWNLOAD  
4.2 helloworld! OK Post할 11자리 데이터를 입력한다.
5 AT+HTTPACTION=1

OK

+HTTPACTION: 1,200,378

Send HTTP POST request
6 AT+HTTPHEAD +HTTPHEAD: DATA,225
HTTP/1.1 200 OK
Date: Sat, 27 Nov 2021 08:37:07 GMT
Content-Type: application/json
Content-Length: 380
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: trueOK
 
7 AT+HTTPREAD?

+HTTPREAD: LEN,378

OK

 
8 AT+HTTPREAD=0,378

OK

+HTTPREAD: DATA,378
{
“args”: {},
“data”: “helloworld!”,
“files”: {},
“form”: {},
“headers”: {
“Accept”: “”,
“Cache-Control”: “no-cache”,
“Content-Length”: “11”,
“Host”: “httpbin.org”,
“User-Agent”: “”,
“X-Amzn-Trace-Id”: “Root=1-61d006b6-3c9d6b002c58fc8a3d446492”
},
“json”: null,
“origin”: “111.65.45.220”,
“url”: “http://httpbin.org/post”
}

+HTTPREAD: 0

 
9 AT+HTTPTERM OK Stop HTTP Service

 

 

 

 

 

 

Adsense

 

 WiFi IoT Module

 

www.mxchip.com

 

 

 Bluetooth Module

www.feasycom.com

 

 

 5G/LTE/CAT-M1/NB-IoT

 

www.simcom.com

 

Viewed Page List