完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试将 HTTPS 发布到 Microsoft Flow。
我可以像这样使用 apister.com 发布到 Flow;我试图用 ESP8266 复制这个但有问题。我找到了以下示例 - https://github.com/esp8266/Arduino/issues/2834这是我的代码 代码:全选#include //https://github.com/esp8266/Arduino #include #include #include #include //https://github.com/tzapu/WiFiManager #include void setup() { Serial.begin(115200); Serial.println(\"Attempting to connect to wifi\"); WiFiManager wifiManager; //wifiManager.resetSettings(); //reset saved settings wifiManager.autoConnect(\"AutoConnectAP\"); Serial.println(\"connected\"); } void loop() { Serial.println(\"attempt POST\"); HTTPClient http; http.begin(\"https://prod-23.westeurope.logic.azure.com:443/workflows/4221219928b1479186337912abba9907/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=FxDTZGTHI1iF784ILXLXM707U0TonG_j_xxxxxxxxxxx\"); http.addHeader(\"Content-Type\", \"application/json\"); String postMessage = \"{\'temp\':\'21\'}\"; int httpCode = http.POST(postMessage); Serial.print(\"http result:\"); Serial.println(httpCode); http.writeToStream(&Serial); String payload = http.getString(); http.end(); delay(5000); //Post Data at every 5 seconds } 我唯一的输出是; 代码:全选Attempting to connect to wifi *WM: *WM: AutoConnect *WM: Connecting as wifi client... *WM: Using last saved values, should be faster *WM: Connection result: *WM: 3 *WM: IP Address: *WM: 192.168.43.166 connected *WM: freeing allocated params! attempt POST http result:-1 |
|
相关推荐 |
|
只有小组成员才能发言,加入小组>>
545浏览 6评论
457浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
437浏览 5评论
441浏览 4评论
411浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 05:05 , Processed in 0.689830 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号