EC25AF: Can't make a QHTTPPOST with custom headers (request+header=1) +QHTTPPOST: 719

Hello,

I’m trying to make a HTTP POST request in request_header=1 for custom headers. HTTP POST does work fine when in request_header=0. I’m using EC25AF.

AT Commands:

w: AT+QIACT?
r: +QIACT: 1,1,1,“10.18.136.252”
r: OK
w: AT+QHTTPCFG=“requestheader”,1
r: OK
w: AT+QHTTPCFG=“responseheader”,0
r: OK
w: AT+QHTTPCFG=“sslctxid”,1
r: OK
w: AT+QSSLCFG=“sslversion”,1,4
r: OK
w: AT+QSSLCFG=“seclevel”,1,0
r: OK
w: AT+QHTTPCFG=“contextid”,1
r: OK
w: AT+QHTTPURL=21,10
r: CONNECT
w: http://xx.xxx.xx.xxx/
r: OK
w: AT+QHTTPPOST=150,20,20
r: CONNECT
w: POST / HTTP/1.1
Host: xx.xxx.xx.xxx
User-Agent: test01
Content-Length: 2
Accept: /
Connection: Keep-Alive
Content-Type: application/json

{}
w:
r: OK
r: +QHTTPPOST: 719

What am I doing wrong?

I have the same issue with QHTTPGET only in request_header=1. request_header=0 without custom headers works fine.

Hi,
Have you used POSTMAN to see if your custom header works?

@tabor.tang-Q Yes, via POSTMAN it works fine. Also when i send the request via TCP packets (QISENDEX) commands it also works fine.

Also in request_header=1 I can see on the server side a connection is never opened. +QHTTPPOST: 719 error also means " 719 - HTTP(S) socket closed". Seem like an setting error on the modem side where the connection is not opened.

AT+QSSLCFG=“sni”,1,1
AT+QSSLCFG=“ignorelocaltime”,1,1
AT+QSSLCFG="ignoremulticertchainverify"1,1
AT+QSSLCFG=“ignoreinvalidcertsign”,1,1
Configure the above instructions and try again.