我正在使用 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/