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.
mbed_app.json@56:02a6401ec508, 2018-08-15 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Aug 15 11:15:04 2018 +0100
- Revision:
- 56:02a6401ec508
- Parent:
- 48:f2739ac5cb01
Improve error handling.
* socket.connect() was not causing program to stop, in case of error
* socket.send() was printing "Error! socket.connect()..." in case of error
* rename labels to upper case for readability
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-sockets
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 5:3e952c60d705 | 1 | { |
mbed_official | 5:3e952c60d705 | 2 | "target_overrides": { |
mbed_official | 40:afef93b6d854 | 3 | "*": { |
mbed_official | 48:f2739ac5cb01 | 4 | "platform.stdio-convert-newlines": true, |
mbed_official | 48:f2739ac5cb01 | 5 | "target.network-default-interface-type": "ETHERNET" |
mbed_official | 5:3e952c60d705 | 6 | } |
mbed_official | 5:3e952c60d705 | 7 | } |
mbed_official | 5:3e952c60d705 | 8 | } |