Test of the cpp-httplib library. This will read the latest block number on Ethereum.
Linux
sudo apt-get install libssl-dev- Comment out the OS_WINDOWS macro in main.cpp
Windows
- Follow MSYS2 installation to get g++ compiler on windows
Linux
g++ main.cpp -lcrypto -lssl
./a.outWindows
g++ main.cpp -lwsock32 -lWs2_32 -lcrypt32 -lcrypto -lssl
a.exeShould see a result like this:
{"jsonrpc":"2.0","id":1,"result":"0xd1369c"}
where "result" is the latest blocknumber on ethereum