command Line
AT+QHTTPCFG=“contextid”,1
OK
AT+QHTTPCFG=“requestheader”,1
OK
AT+QHTTPCFG=“contenttype”,3
OK
AT+QSSLCFG=“sslversion”,1,3
OK
AT+QSSLCFG=“seclevel”,1,0
OK
AT+QHTTPURL=102,80
CONNECT
https://xxx.xxx.com/v3/api/Image/{a78a06a2-75ea-40e8-ba3d-xxxxxxxxxx}?timestamp=20210513T161000Z
AT+QHTTPPOST=2615,80,80
CONNECT
POST /v3/api/Image/{a78a06a2-75ea-40e8-ba3d-xxxxxxxxxx}?timestamp=20210513T161000Z HTTP/1.1
Host: xxx.xxx.com
Authorization: bearer KRLlv2ZIvhlg4-0i4_…
Content-Type: multipart/form-data; boundary=----8d916e5fb439d49
Content-Length: 2144
----8d916e5fb439d49
Content-Disposition: form-data; name=“image”; filename=“123.jpeg”
Content-Type: image/jpeg
(image data to byte)
----8d916e5fb439d49–
+QHTTPPOST: 0,400,148
AT+QHTTPREAD=80
{“ExceptionCode”:3000,“DetailMessage”:“can not find uploaded file”,“ExceptionDecription”:“The format or data type of input parameteres are invalid”}
The issue:
-
I have failure to post image, it returned +QHTTPPOST: 0,400, i can not find what code 400 means on manual. Could you please let me know what httprspcode code 400 means?
-
And i want to know how to post imagine with Authorization header, is it possible to provide me a sample how to post it?