AT+KHTTPHEADER=1 After we send “Content-Type: application/json” + RETURN. “–EOF–Pattern–” We get OK from module.
AT+KHTTPPOST=1,"/api/v1/hc" (we get CONNECT). After we send data.
It seems the server connection is working and the server gets some data, but something is wrong. We get “Bad Request” from the server and also server answer to us that “we are sending TEXT/PLAIN” data (you can see in the attached screenshot).
It seems that the command AT+KHTTPHEADER=1 is not working/is not accepted by the module.
16:42:20.591 on 19-Feb-2020> at+khttpcfg?
16:42:29.917 on 19-Feb-2020>
16:42:29.917 on 19-Feb-2020> +KHTTPCFG: 1,1,“httpbin.org”,80,0,“”,“”,0,0,0
16:42:29.917 on 19-Feb-2020>
16:42:29.917 on 19-Feb-2020> OK
16:42:29.917 on 19-Feb-2020> at+khttpheader?
16:42:43.986 on 19-Feb-2020>
16:42:43.986 on 19-Feb-2020> +KHTTPHEADER: 1,1
16:42:43.986 on 19-Feb-2020> Content-Type: application/json
16:42:43.997 on 19-Feb-2020>
16:42:43.997 on 19-Feb-2020>
16:42:43.998 on 19-Feb-2020> OK
16:42:43.998 on 19-Feb-2020> at+khttppost=1,“/post”
16:43:13.186 on 19-Feb-2020>
16:43:17.627 on 19-Feb-2020> +KCNX_IND: 1,4,1
16:43:17.627 on 19-Feb-2020>
16:43:17.627 on 19-Feb-2020> +CEREG: 4
16:43:17.627 on 19-Feb-2020>
16:43:17.628 on 19-Feb-2020> +CEREG: 5
16:43:17.628 on 19-Feb-2020>
16:43:17.628 on 19-Feb-2020> +KCNX_IND: 1,1,0
16:43:17.628 on 19-Feb-2020>
16:43:17.628 on 19-Feb-2020> +KHTTP_IND: 1,1
16:43:17.628 on 19-Feb-2020>
16:43:17.643 on 19-Feb-2020> CONNECT
16:43:17.643 on 19-Feb-2020> HTTP/1.1 200 OK
16:43:33.267 on 19-Feb-2020> date: Wed, 19 Feb 2020 09:43:18 GMT
16:43:33.314 on 19-Feb-2020> content-type: application/json
16:43:33.314 on 19-Feb-2020> content-length: 345
16:43:33.314 on 19-Feb-2020> connection: keep-alive
16:43:33.314 on 19-Feb-2020> server: gunicorn/19.9.0
16:43:33.314 on 19-Feb-2020> access-control-allow-origin: *
16:43:33.314 on 19-Feb-2020> access-control-allow-credentials: true
I recommend you:
Verify your module on httpbin.org with same above flow
Enable flow control by AT&K3. You will need to enable hardware flow control for the terminal as well
Thanks
Hi Rique,
It is highly recommended to configure the module for hardware flow control using command AT&K3 but I tried on AT&K0 too, It works on both. Here is result I tried on a 3 wire connection to the HL7800.