Sending an HTTP custom header with JSON content type to a webserver from an BC660

Hello,

I’m trying to send data to a webhook from an BC660K module. When using standard content-type(application/x-www-form-urlencoded) the message is send succesfully, but when i put in a custom header with json content type, it isn’t working. I get the HTTP unkown error 701. What do i do wrong?

Below is my code.

Example URL: http://webhook.site/779647af-ab3c-49f4-8fda-6fa6800b965b/

Blockquote
sprintf(totaalmessage, “POST / HTTP/1.1\r\nHost: %s\r\nAccept: /\r\nUser-Agent: QUECTEL_MODULE\r\nConnection: Keep-Alive\r\nContent-Type: application/json\r\nContent-Length: %s\r\n\r\n%s”,url,lengthmessagecontentc,message);
Blockquote

Yes i know the datasheet, i set up the post header according to the datasheet, but it’s not working

This is my payload string what i try to send, it’s not working, i tried different combinations and HTTP post lengths but it’s not working

Settings:
AT+QHTTPCFG=“contextid”,0

AT+QHTTPCFG=“contenttype”,0

AT+QHTTPCFG=“requestheader”,1

AT+QHTTPURL=23,80

Blockquote
http://webhook.site:80/

AT+QHTTPPOST=177,80,80

Blockquote
POST /1f4d0250-b609-4549-8282-b5211237741c/ HTTP/1.1\r\nHost: http://webhook.site:80/\r\nAccept: /\r\nContent-Type: application/json\r\nContent-Length: 15\r\n\r\n{“name”:“test”}

i get always error 701