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: wave_player 4DGL-uLCD-SE HC_SR04_Ultrasonic_Library
Diff: main.cpp
- Revision:
- 12:2e7466eba9a3
- Parent:
- 5:3e952c60d705
- Child:
- 13:ed9e4aa00044
--- a/main.cpp Mon Feb 27 17:30:06 2017 +0000
+++ b/main.cpp Wed Mar 08 20:30:07 2017 +0000
@@ -19,12 +19,12 @@
socket.open(&net);
socket.connect("developer.mbed.org", 80);
- // Send a simple http request
+ // Send an HTTP request
char sbuffer[] = "GET / HTTP/1.1\r\nHost: developer.mbed.org\r\n\r\n";
int scount = socket.send(sbuffer, sizeof sbuffer);
printf("sent %d [%.*s]\n", scount, strstr(sbuffer, "\r\n")-sbuffer, sbuffer);
- // Recieve a simple http response and print out the response line
+ // Receive an http response and print out the response line
char rbuffer[64];
int rcount = socket.recv(rbuffer, sizeof rbuffer);
printf("recv %d [%.*s]\n", rcount, strstr(rbuffer, "\r\n")-rbuffer, rbuffer);