IFTTTに引数付きでPOST出来る様に改修
Dependencies: EthernetInterface HTTPClient mbed-rtos mbed
Fork of HTTPClient_IFTTT_Maker_post_HelloWorld by
Revision 2:7101bf2516ef, committed 2015-07-13
- Comitter:
- jksoft
- Date:
- Mon Jul 13 14:05:38 2015 +0000
- Parent:
- 1:b713347c7f63
- Commit message:
- HTTPText?????JSON???POST??????
Changed in this revision
HTTPClient.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b713347c7f63 -r 7101bf2516ef HTTPClient.lib --- a/HTTPClient.lib Thu Jun 25 12:14:29 2015 +0000 +++ b/HTTPClient.lib Mon Jul 13 14:05:38 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/colinmeikle/code/HTTPClient/#a0d9edb403e5 +https://developer.mbed.org/users/jksoft/code/HTTPClient/#8164b7ad6115
diff -r b713347c7f63 -r 7101bf2516ef main.cpp --- 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");