Hello, I’m currently working with EC200U for HTTP GET and POST requests. I’m unsure why it’s displaying bad requests when using AT commands, but I’m able to successfully work with it using Postman software.
[2024-03-21 10:00:26:342_S:] AT+QIDEACT=1
[2024-03-21 10:00:26:395_R:] AT+QIDEACT=1
[2024-03-21 10:00:26:489_R:] OK
[2024-03-21 10:00:27:361_S:] AT+QICSGP=1,1,“www”,“”,“”,0
[2024-03-21 10:00:27:419_R:] AT+QICSGP=1,1,“www”,“”,“”,0
[2024-03-21 10:00:27:419_R:] OK
[2024-03-21 10:00:28:370_S:] AT+QIACT?
[2024-03-21 10:00:28:428_R:] AT+QIACT?
[2024-03-21 10:00:28:428_R:] OK
[2024-03-21 10:00:29:396_S:] AT+QIACT=1
[2024-03-21 10:00:29:455_R:] AT+QIACT=1
[2024-03-21 10:00:29:612_R:] OK
[2024-03-21 10:00:30:423_S:] AT+QIACT?
[2024-03-21 10:00:30:483_R:] AT+QIACT?
[2024-03-21 10:00:30:483_R:] +QIACT: 1,1,1,“100.99.241.117”
[2024-03-21 10:00:30:483_R:] OK
[2024-03-21 10:00:31:434_S:] AT+QHTTPCFG=“contextid”,1
[2024-03-21 10:00:31:492_R:] AT+QHTTPCFG=“contextid”,1
[2024-03-21 10:00:31:492_R:] OK
[2024-03-21 10:00:32:459_S:] AT+QHTTPCFG=“requestheader”,1
[2024-03-21 10:00:32:518_R:] AT+QHTTPCFG=“requestheader”,1
[2024-03-21 10:00:32:518_R:] OK
[2024-03-21 10:00:33:480_S:] AT+QHTTPURL=33,80
[2024-03-21 10:00:33:539_R:] AT+QHTTPURL=33,80
[2024-03-21 10:00:33:539_R:] CONNECT
[2024-03-21 10:00:33:540_R:] DSR:1 CTS:1 RI:0 (DCD:1)
[2024-03-21 10:00:34:505_S:] http://emprostar.com:423/api/login
[2024-03-21 10:00:34:565_R:] OK
[2024-03-21 10:00:35:533_S:] AT+QHTTPPOST=147,80,80
[2024-03-21 10:00:35:593_R:] AT+QHTTPPOST=147,80,80
[2024-03-21 10:00:35:840_R:] CONNECT
[2024-03-21 10:00:36:545_S:] POST /api/login HTTP/1.1
[2024-03-21 10:00:37:558_S:] Host: emprostar.com:423
[2024-03-21 10:00:38:582_S:] Content-Type: application/json
[2024-03-21 10:00:39:607_S:] Accept: /
[2024-03-21 10:00:40:627_S:] Content-Length: 52
[2024-03-21 10:00:41:635_S:] {“Username”: “shubhangi”,“Password”: “shubhangi123”}
[2024-03-21 10:00:41:693_R:] OK
[2024-03-21 10:00:42:004_R:] +QHTTPPOST: 0,400,339
[2024-03-21 10:00:42:660_S:] AT+QHTTPREAD=80
[2024-03-21 10:00:42:720_R:] AT+QHTTPREAD=80
[2024-03-21 10:00:42:720_R:] CONNECT
[2024-03-21 10:00:42:720_R:]
[2024-03-21 10:00:42:720_R:] Bad Request
[2024-03-21 10:00:42:720_R:]
[2024-03-21 10:00:42:720_R:]
Bad Request - Invalid Header
[2024-03-21 10:00:42:720_R:]
HTTP Error 400. The request has an invalid header name.
[2024-03-21 10:00:42:720_R:]
[2024-03-21 10:00:42:720_R:] OK
[2024-03-21 10:00:42:844_R:] +QHTTPREAD: 0