bitcoind – Bitcoin-cli responding but not curl

0
8


According to the bitcoin documentation I can make curl calls to my bitcoin node. However, whenever I run a curl command like the following (as per the docs):

curl --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbestblockhash", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

I get no response. But when I run the bitcoin-cli edition:

bitcoin-cli getbestblockhash

I get a response.

So what is the difference? What am I missing?

I’ve seen this and this but they were never resolved.



Source link

Leave a reply