I am trying to copy the following curl command using meteor HTTP
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' http://localhost:8545
The command is from here
This is what I tried:
HTTP.call('POST',"http://localhost:8545",{data:{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}},function(res,error){console.log(res)})
but it returns null. The curl command gives {"jsonrpc":"2.0","id":83,"result":"(the blocknumber)"}
XMLHttpRequest cannot load localhost:8545. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.