Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support HTTPClient mbed
Fork of HTTPClient_HelloWorld by
Revision 8:eea979594a37, committed 2014-06-13
- Comitter:
- mazgch
- Date:
- Fri Jun 13 06:39:40 2014 +0000
- Parent:
- 7:b14d0f112a73
- Child:
- 9:cd98ff458412
- Commit message:
- remove test code
Changed in this revision
--- a/C027_Support.lib Fri Jun 06 15:18:36 2014 +0000 +++ b/C027_Support.lib Fri Jun 13 06:39:40 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/ublox/code/C027_Support/#3915192f6d7e +http://mbed.org/teams/ublox/code/C027_Support/#d697fe11f3e5
--- a/main.cpp Fri Jun 06 15:18:36 2014 +0000
+++ b/main.cpp Fri Jun 13 06:39:40 2014 +0000
@@ -28,30 +28,7 @@
if (!mdm.connect(SIMPIN, APN,USERNAME,PASSWORD))
return -1;
HTTPClient http;
- {
- char urlString[100] = "http://192.38.36.13/hanshenrik/GPRS/gprs.php?mode=";
- char url[200];
- char databuffer[100];
- strcpy (url,urlString);
- int id = 10;
- float la = 10.0, lo = 20.0;
- float pres = 30.0, temp = 40.0, o3 = 50.0;
- int co2 = 200;
- //sprintf(databuffer, "latitude&id=%d&data=%.5f", id, la); //This is a short URL that works!
- sprintf(databuffer, "update&id=%d&lat=%.1f&lng=%.1f&pres=%.1f&temp=%.1f&co2=%d&o3=%.1f",id,la,lo,pres,temp,co2,o3);
- printf("URL string: \"%s\"\r\n", url);
- wait_ms(1000);
- strcat(url, databuffer);
- wait_ms(1000);
- printf("URL string: \"%s\"\r\n", url);
- wait_ms(1000);
- int ret = http.get(url, str, 128);
- wait_ms(1000);
- printf("%d \"%s\"\r\n", ret, str);
- wait_ms(1000);
- while (1);
- }
-
+
//GET data
printf("\nTrying to fetch page...\n");
int ret = http.get("http://mbed.org/media/uploads/donatien/hello.txt", str, 128);
--- a/mbed.bld Fri Jun 06 15:18:36 2014 +0000 +++ b/mbed.bld Fri Jun 13 06:39:40 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file
