IFTTTに引数付きでPOST出来る様に改修
Dependencies: EthernetInterface HTTPClient mbed-rtos mbed
Fork of HTTPClient_IFTTT_Maker_post_HelloWorld by
Diff: main.cpp
- Revision:
- 2:7101bf2516ef
- Parent:
- 1:b713347c7f63
--- a/main.cpp Thu Jun 25 12:14:29 2015 +0000 +++ b/main.cpp Mon Jul 13 14:05:38 2015 +0000 @@ -22,9 +22,11 @@ return -1; } - HTTPMap map; - map.put("value1", "Hello World."); - ret = http.post("http://maker.ifttt.com/trigger/button_pressed/with/key/YOUR_SECRET_KEY", map, &inData); +// HTTPMap map; + HTTPText outText(str, 512); +// map.put("value1", "Hello World."); + outText = "{ \"value1\" : \"Hello World.\"}"; + ret = http.post("http://maker.ifttt.com/trigger/button_pressed/with/key/YOUR_SECRET_KEY", outText, &inData); if (!ret) { pc.printf("HTTP request succeeded.\r\n");