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: EthernetNetIf mbed
Diff: HTTPClientExample.cpp
- Revision:
- 1:4e6e885b48a2
- Parent:
- 0:b97bbcd81179
- Child:
- 3:5964d831654c
diff -r b97bbcd81179 -r 4e6e885b48a2 HTTPClientExample.cpp
--- a/HTTPClientExample.cpp Fri Jun 11 16:43:30 2010 +0000
+++ b/HTTPClientExample.cpp Fri Jun 18 09:39:04 2010 +0000
@@ -1,40 +1,38 @@
-#include "mbed.h"
-#include "EthernetNetIf.h"
-#include "HTTPClient.h"
-
-EthernetNetIf eth;
-HTTPClient http;
-
-int main() {
-
- printf("Start\n");
-
- printf("\r\nSetting up...\r\n");
- EthernetErr ethErr = eth.setup();
- if(ethErr)
- {
- printf("Error %d in setup.\n", ethErr);
- return -1;
- }
- printf("\r\nSetup OK\r\n");
-
- HTTPText txt;
-
- HTTPResult r = http.get("http://mbed.org/media/uploads/donatien/hello.txt", &txt);
- if(r==HTTP_OK)
- {
- printf("Result :\"%s\"\n", txt.gets());
- }
- else
- {
- printf("Error %d\n", r);
- }
-
- while(1)
- {
-
- }
-
- return 0;
-
-}
+#include "mbed.h"
+#include "EthernetNetIf.h"
+#include "HTTPClient.h"
+
+EthernetNetIf eth;
+HTTPClient http;
+
+int main() {
+
+ printf("Setting up...\n");
+ EthernetErr ethErr = eth.setup();
+ if(ethErr)
+ {
+ printf("Error %d in setup.\n", ethErr);
+ return -1;
+ }
+ printf("Setup OK\n");
+
+ HTTPText txt;
+
+ HTTPResult r = http.get("http://mbed.org/media/uploads/donatien/hello.txt", &txt);
+ if(r==HTTP_OK)
+ {
+ printf("Result :\"%s\"\n", txt.gets());
+ }
+ else
+ {
+ printf("Error %d\n", r);
+ }
+
+ while(1)
+ {
+
+ }
+
+ return 0;
+
+}