0

I am using EC200U module to make an HTTPS POST request to my Flask server hosted on Render. The SSL configuration seems fine, but I always receive HTTP/1.1 400 Bad Request from the server.

Here are the AT commands I tried:

ATE1
ATI
+CPIN: READY
+CREG: 0,5
+CEREG: 0,5
+CSQ: 12,99

AT+QICSGP=1,1,"airtelgprs.com","","",1
AT+QIACT=1
AT+QIACT?
+QIACT: 1,1,1,"100.92.77.245"

AT+QPING=1,"weatherapp-d0io.onrender.com"

AT+QHTTPCFG="sslctxid",1
AT+QSSLCFG="sslversion",1,4
AT+QSSLCFG="ciphersuite",1,0xffff
AT+QSSLCFG="seclevel",1,0
AT+QSSLCFG="sni",1,1
AT+QHTTPCFG="contextid",1
AT+QHTTPCFG="requestheader",1
AT+QHTTPCFG="responseheader",1
AT+QHTTPCFG="header","content-type:application/json"
AT+QHTTPCFG="header","user-agent:quectel"
AT+QHTTPCFG="header","accept:*/*"
AT+QHTTPCFG="header","accept-encoding:gzip,deflate,br"
AT+QHTTPCFG="header","connection:keep-alive"
AT+QHTTPCFG="header","host:weatherapp-d0io.onrender.com"

AT+QHTTPURL=48,120
CONNECT
OK

AT+QHTTPPOST=85,120,120
CONNECT
OK

AT+QHTTPREAD=80
CONNECT
HTTP/1.1 400 Bad Request
Server: cloudflare

No matter what I try, I only get 400 Bad Request. I tested the same API using Postman, and it works correctly — so the issue isn’t with the URL. I’m working with a Quectel EC200U module and trying to send a POST request using AT commands. Could anyone guide me on what might be missing in my request (headers/body/SSL config)?

2
  • 1
    Server: cloudflare note this means the request terminated at cloudflare and didn’t reach your upstream. You may find it helpful to post to a local test app where you have full control and can oog what headers/body is received. Commented Aug 26 at 13:40
  • 2
    What is the response if you run the exact same request with curl? Commented Aug 26 at 16:00

1 Answer 1

0

Remove the request header line; it will work:

AT+QHTTPCFG="requestheader",1 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.