HTTP(S)-GET Exercise
Practice communication between server and client using HTTP GET method with LTE-M/CAT-M1 module.
2. HTTP-GET → SIM7000 & SIM7070, SIM7080, SIM7090
NO | Command | Response | 설명 |
1 | PDP Context 설정 | ||
2 | AT+SHCONF=”URL”,”http://httpbin.org” | OK | Set up server URL |
AT+SHCONF=”BODYLEN”,1024 | OK |
Set HTTP body length, for range of max body length |
|
3 | AT+SHCONF=”HEADERLEN”,350 | OK |
Set HTTP head length, for range of max head length |
AT+SHCONN | OK | Connect to server | |
AT+SHSTATE? |
+SHSTATE: 1 OK |
Get HTTP status | |
4 | AT+SHCHEAD | OK |
Clear HTTP header, because of http header is appended |
AT+SHAHEAD=”Accept”,”*/*” | OK | Add header content | |
AT+SHAHEAD=”User-Agent”,”curl/7.47.0″ | OK | Add header content | |
AT+SHAHEAD=”Cache-control”,”no-cache” | OK | Add header content | |
AT+SHAHEAD=”Connection”,”keep-alive” | OK | Add header content | |
5 | AT+SHAHEAD=”Accept”,”*/*” | OK | Add header content |
6 | AT+SHREQ=”/get?user=jack&password=123″,1 |
OK +SHREQ: “GET”,200,319 |
Set request type is GET. |
– | AT+SHREAD=0,319 |
OK +SHREAD: 319 |
|
6.1 | AT+SHDISC | OK |