HTTP POST Request -- BG95

Hi All,

We are try to send data (JSON_Packet) to HTTP Server Thingsboard
with no success

Our Code:

Send_Str("AT+QHTTPCFG=\"contextid\",1\r\n");               
Send_Str("AT+QHTTPCFG=\"requestheader\",1\r\n");      

Send_Str(“AT+QHTTPCFG=“responseheader”,1\r\n”);
// Send_Str(“AT+QHTTPCFG=“sslctxid”,0\r\n”); // no SSL
Send_Str(“AT+QHTTPCFG=“contenttype”,0\r\n”); // application/json
Send_Str(“AT+QHTTPCFG?\r\n”);
Send_Str(“AT+QIACT?\r\n”);
Send_Str(“AT+QICSGP=1,1,“UNINET”,”","",1\r\n")
Send_Str(“AT+QIACT=1\r\n”);
Send_Str(“AT+QHTTPURL=55,80\r\n”); // 55 data size SEND URL
Send_Str(“http://.*..**/api/v1/cKJx5f0CO0JsDVGT8uTy/telemetry”); // Thingsboard Server
Send_Str(“AT+QHTTPURL?\r\n”);
Send_Str(“AT+QHTTPPOST=118,80,80\r\n”); // 118 data size Send DATA
/*
// HTTP POST EXAMPLE

 POST /api/v1/cKJx5f0CO0JsDVGT8uTy/telemetry HTTP/1.1
 Host: **.*.**.**
 Content-Type:application/json

{“dT”:6.6,“TempZero”:34.5,“mVHeat”:2000,“Batt”:3.7,“Dendro”:1670,“Irr”:45,“V1”:300,“V2”:400,“V3”:500,“V4”:600,“V5”:21}
*/

Send_Str("POST /api/v1/cKJx5f0CO0JsDVGT8uTy/telemetry HTTP/1.1\r\n");
Send_Str("Host: **.*.**.**\r\n");
Send_Str("Content-Type: application/json\r\n");

// JSON_Packet
Send_Str("“dT”:20.20,“TempZero”:34.5,“mVHeat”:2000,“Batt”:3.7,“Dendro”:1670,“Irr”:45,“V1”:300,“V2”:400,“V3”:500,"“V4”:600,“V5”:1}\r\n");
Send_Str("\r\n\r\n");
Send_Str(“AT+QHTTPREAD=80\r\n”);
Send_Str(“AT+QIDEACT=1\r\n”);

Response we got is
+QHTTPPOST: 0,400

Please advise how to make it work
What is missing ??

Thanks in advance

Hi
Sorry for the late reply.
Send_Str(“Content-Type: application/json\r\n”);
//Winnie: You need \r\n\r\n between the header and body when grouping packages.

Hai sir i am developing quectel ec20 hhtp post method i am not 200 success getting 400 respond please support me
[2021-01-18_16:37:46:987]AT+QHTTPCFG=“contextid”,1

[2021-01-18_16:37:46:987]OK
[2021-01-18_16:37:48:043]AT+QHTTPCFG=“requestheader”,1

[2021-01-18_16:37:48:043]OK
[2021-01-18_16:37:48:635]AT+QHTTPCFG=“requestheader”,1

[2021-01-18_16:37:48:635]OK
[2021-01-18_16:37:49:179]AT+QHTTPCFG=“sslctxid”,1

[2021-01-18_16:37:49:179]OK
[2021-01-18_16:37:49:691]AT+QHTTPCFG=“contenttype”,1

[2021-01-18_16:37:49:691]OK
[2021-01-18_16:37:50:699]AT+QIACT=1

[2021-01-18_16:37:50:699]ERROR
[2021-01-18_16:37:53:931]AT+QIDEACT=1

[2021-01-18_16:37:53:946]OK
[2021-01-18_16:37:55:274]AT+QIACT=1

[2021-01-18_16:37:55:289]OK
[2021-01-18_16:37:57:801]AT+QICSGP=1,1,“airtelgprs.com”,"" ,"" ,1

[2021-01-18_16:37:57:801]OK
[2021-01-18_16:37:59:467]AT+QHTTPURL=54,60

[2021-01-18_16:37:59:483]CONNECT
[2021-01-18_16:38:01:989]
[2021-01-18_16:38:01:989]OK
[2021-01-18_16:38:06:341]AT+QHTTPPOST=224,30

[2021-01-18_16:38:06:551]CONNECT
[2021-01-18_16:38:12:589]
[2021-01-18_16:38:12:589]OK
[2021-01-18_16:38:12:693]
[2021-01-18_16:38:12:693]+QHTTPPOST: 0,400,326
[2021-01-18_16:38:13:788]

Hi,
We recommend that you check that the header information in the contents of your post group package is correct or not.
I hope my advice will be helpful to you.