c - 使用 ciao library-Arduino UNO WIFI 请愿 POST

标签 c arduino-uno

我正在使用 Arduino UNO WIFI shield,并且我已经阅读了您的库 Ciao ( https://github.com/arduino-org/Ciao ),它非常棒,所以我正在使用方法 post 请求发送数据,但我无法发送我的数据。这是我的代码:

char * method = "POST";
char * CONNECTOR   = "rest"; 
char * SERVER_ADDR   = "myserver.com"; 

String uri = "/public/auth_login";
String post_data = "name=Alice&age=12";
CiaoData data = Ciao.write(CONNECTOR,SERVER_ADDR, uri, method);

我知道 Ciao.write 接收四个值,那么,我可以在哪里放置我的发布数据?

哦!请问,你能帮帮我吗?

非常感谢!

最佳答案

char * CONNECTOR   = "rest"; 
char * SERVER_ADDR   = "myserver.com"; 

String uri = "/public/auth_login?name=Alice&age=12";

CiaoData data = Ciao.write(CONNECTOR,SERVER_ADDR, uri);

我已经像这样使用 Ciao 库发送数据,这似乎有效。

关于c - 使用 ciao library-Arduino UNO WIFI 请愿 POST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39925689/

相关文章:

c - MPI:处理器在单个 MPI 进程上无法达到 100%

c - Arduino : "error: expected unqualified-id before ' {' token"

azure - 将 Arduino Uno 数据直接解析到 IoT

C++ 从 'const char*' 到 'char*' 的无效转换 Arduino Uno

arduino - Mac + Uno + avrdude : stk500_recv(): programmer is not responding

c - 将多个值从 shell 脚本返回到 c 程序

c - printf中的类型检查是如何实现的?

有人能说出 "Platform"到底是什么意思吗?

c++ - ffmpeg - 比较 2 个 AVFrames 数据

arduino - Arduino uno 中用于数字读取和计数脉冲的 CPU 周期