This is a quick example of a simple HTTP client program using the network-socket API that is provided as a part of mbed-os. The program brings up an underlying network interface, and uses it to perform an HTTP transaction over a TCPSocket.
Diff: README.md
- Revision:
- 53:0d44278430d3
- Parent:
- 49:1923a727df5b
- Child:
- 61:e61d4d810148
--- a/README.md Thu Jul 19 11:15:04 2018 +0100 +++ b/README.md Tue Jul 24 15:15:09 2018 +0100 @@ -12,7 +12,21 @@ For example, building on Ethernet enabled boards, you do not do any configuration. -Building for WiFi boards, you need to provide SSID, password and security settings in `mbed_app.json` as instructed in the documentation. +Building for WiFi boards, you need to provide SSID, password and security settings in `mbed_app.json` as instructed in the documentation. For example, like this: + +``` +{ + "target_overrides": { + "*": { + "platform.stdio-convert-newlines": true, + "target.network-default-interface-type": "WIFI", + "nsapi.default-wifi-security": "WPA_WPA2", + "nsapi.default-wifi-ssid": "\"ssid\"", + "nsapi.default-wifi-password": "\"password\"" + } + } +} +``` Building for boards that have more that one network interface, you might need to override `target.network-default-interface-type` variable.