Example of doing HTTP calls using mbed-js-http for JavaScript on mbed.
- Configure your connectivity method in
native_extras/mbed_lib.json
(more info). - Run
npm install
. - Run
gulp --target=YOUR_TARGET_NAME
.- To find your target name, look at the platforms page for your development board.
- Copy the
mbedos5.hex
ormbedos5.bin
file frombuild/out/YOUR_TARGET_NAME
onto your development board. - Attach a serial monitor (baud rate 115,200) to your device to see the output.
The underlying library supports HTTPS, but it's not implemented in mbed-js-http yet - mainly because the extra memory requirements for the TLS library. But should not be too hard.