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: HTTPClient mbed-rtos-initial-thread-larger-stack mbed wolfSSL
Revision 5:6d00f26f7b59, committed 2016-04-24
- Comitter:
- takashikojo
- Date:
- Sun Apr 24 06:42:16 2016 +0000
- Parent:
- 4:6b0e7a10a395
- Commit message:
- with wolfSSL3.6.0;
Changed in this revision
--- a/HTTPClient.lib Fri Dec 05 11:55:42 2014 +0000 +++ b/HTTPClient.lib Sun Apr 24 06:42:16 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/wolfSSL/code/HTTPClient/#a9ecee69c6b5 +http://developer.mbed.org/users/wolfSSL/code/HTTPClient/#77082c88748a
--- a/main.cpp Fri Dec 05 11:55:42 2014 +0000 +++ b/main.cpp Sun Apr 24 06:42:16 2016 +0000 @@ -2,7 +2,7 @@ #include "EthernetInterface.h" #include "HTTPClient.h" -#define SERVER_URL "https://192.168.1.12/index.html" +#define SERVER_URL "https://192.168.10.15/index.html" EthernetInterface eth; HTTPClient http; @@ -11,28 +11,38 @@ int main() { int ret ; + int i ; +#define URL_SIZE 100 + char server_url[URL_SIZE] ; printf("HTTP Client, Starting,...\n") ; eth.init(); //Use DHCP while(1) { - printf("Trying\n") ; - ret = eth.connect(); - if(ret == 0)break ; + printf("Trying to connect to Ethernet\n") ; + if(eth.connect() == 0)break ; } printf("HTTP Client, IP Address is %s\n", eth.getIPAddress()); while(1) { - printf("\nTrying to fetch page... %s\n", SERVER_URL); + printf("URL(\"http://.../...\" or \"https://.../...\"):") ; + for(i=0; i<sizeof(server_url); i++) { + if((server_url[i] = getchar()) == '\r') { + server_url[i] = '\0' ; + putchar('\n') ; + break ; + } else putchar(server_url[i]) ; + } + + printf("\nTrying to fetch page... %s\n", server_url); memset(recvBuff, '\0', sizeof(recvBuff)) ; - ret = http.get(SERVER_URL, recvBuff, sizeof(recvBuff),16); + ret = http.get(server_url, recvBuff, sizeof(recvBuff),16); if (!ret) { printf("Result: %s\n", recvBuff); } else { printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode()); } - wait(10.0) ; } eth.disconnect();
--- a/mbed-src.lib Fri Dec 05 11:55:42 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed-src/#cc1c4962551c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Apr 24 06:42:16 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wolfSSL.lib Sun Apr 24 06:42:16 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/wolfSSL/code/wolfSSL/#28278596c2a2