this is a demo code for HTTPClient_GPRS library
Dependencies: GPRSInterface HTTPClient_GPRS mbed USBDevice
Fork of Seeed_HTTPClient_GPRSInterface_HelloWorld by
Revision 2:ecc68e79d692, committed 2015-03-06
- Comitter:
- yihui
- Date:
- Fri Mar 06 09:22:41 2015 +0000
- Parent:
- 1:16498811e319
- Commit message:
- update url and increase url
Changed in this revision
HTTPClient_GPRS.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 |
--- a/HTTPClient_GPRS.lib Fri Mar 06 08:07:55 2015 +0000 +++ b/HTTPClient_GPRS.lib Fri Mar 06 09:22:41 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/lawliet/code/HTTPClient_GPRS/#f22357c94c81 +http://mbed.org/users/lawliet/code/HTTPClient_GPRS/#aaab2081c1c0
--- a/main.cpp Fri Mar 06 08:07:55 2015 +0000 +++ b/main.cpp Fri Mar 06 09:22:41 2015 +0000 @@ -22,7 +22,7 @@ GPRSInterface gprs(PIN_TX, PIN_RX, 115200, "uninet", NULL, NULL); HTTPClient http; -char str[512]; +char str[1024]; #ifdef TARGET_ARCH_GPRS DigitalOut power(P1_2); @@ -71,13 +71,13 @@ int ret; HTTPMap map; - HTTPText inText(str, 512); + HTTPText inText(str, 1024); HTTPText outText(str); #if TEST_HTTP_GET //GET data LOG("\nTrying to fetch page...\n"); - ret = http.get("http://mbed.org/media/uploads/mbed_official/hello.txt", str, 512); + ret = http.get("http://developer.mbed.org/media/uploads/mbed_official/hello.txt", str, 1024); if (!ret) { LOG("Page fetched successfully - read %d characters\n", strlen(str)); LOG("Result: %s\n", str);