Ai-thinker bw16 http post报错

bw16 http post报错
Body returned follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

代码如下:
char post_content[]="{\"id\":1,\"mc_id\": \"AGV02\"};
int str_length = sizeof(post_content)/sizeof(post_content[0]);
     Serial.println("str_length:");
       Serial.println(str_length);
    http_post.sendHeader("Content-Length",str_length);
    err2 = http_post.post(ip_addr2,kHostname_post,30200,post_kPath2,post_content);
       Serial.println("err2:");
       Serial.println(err2);

https://github.com/Ameba-AIoT/ameba-arduino-pro2/blob/dev/Arduino_zip_libraries/Ameba_TFT_eSPI.zip

https://www.amebaiot.com/cn/ameba-arduino-facebook/

https://github.com/Ameba-AIoT/ameba-arduino-d

https://ameba-doc-arduino-sdk.readthedocs-hosted.com/en/latest/ameba_d/bw16-typeb/Example_Guides/index.html

据了解,arduinoIDE开发不支持

https://bbs.ai-thinker.com/forum.php?mod=viewthread&tid=47129

posted @ 2025-07-29 13:12  txwtech  阅读(8)  评论(0)    收藏  举报