From 2c3ef0b757d097374b728793a24e21ea5c480c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Havel?= <61149543+taxmeifyoucan@users.noreply.github.com> Date: Thu, 24 Sep 2020 13:03:56 +0200 Subject: [PATCH] fix curl rpc calls where --data flag was erroneously placed (#21602) Fixed curl rpc calls. --data flag has to be placed before data content, current command results in curl error. --- docs/_getting-started/index.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_getting-started/index.md b/docs/_getting-started/index.md index 3600e2041e..6f49a56aba 100644 --- a/docs/_getting-started/index.md +++ b/docs/_getting-started/index.md @@ -147,17 +147,17 @@ web3.fromWei(eth.getBalance(""),"ether") You can use standard HTTP requests to connect to a Geth node using the RPC APIs, for example: ```shell -curl -X POST http://:8545 --data \ +curl -X POST http://:8545 \ -H "Content-Type: application/json" \ - '{"jsonrpc":"2.0", "method":"", "params":[], "id":1}' + --data'{"jsonrpc":"2.0", "method":"", "params":[], "id":1}' ``` ### Check account balance ```shell -curl -X POST http://:8545 --data \ +curl -X POST http://:8545 \ -H "Content-Type: application/json" \ - '{"jsonrpc":"2.0", "method":"eth_getBalance", "params":["","latest"], "id":1}' + --data '{"jsonrpc":"2.0", "method":"eth_getBalance", "params":["","latest"], "id":1}' ``` Getting the balance of an account does not require a signed transaction, @@ -168,9 +168,9 @@ so Clef does not ask for approval, and Geth returns the value. Send 0.01 ETH from the account that you added ETH to with the Görli faucet, to the second account you created: ```shell -curl -X POST http://:8545 --data \ +curl -X POST http://:8545 \ -H "Content-Type: application/json" \ - '{"jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[{"from": "","to": "","value": "0x9184e72a"}], "id":1}' + --data '{"jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[{"from": "","to": "","value": "0x9184e72a"}], "id":1}' ``` This action does require signing, so Clef prompts you to approve it, and if you do, @@ -180,7 +180,7 @@ Geth proceeds with the transaction. To check, get the account balance of the second account: ```shell -curl -X POST http://:8545 --data \ +curl -X POST http://:8545 \ -H "Content-Type: application/json" \ - '{"jsonrpc":"2.0", "method":"eth_getBalance", "params":["","latest"], "id":1}' + --data '{"jsonrpc":"2.0", "method":"eth_getBalance", "params":["","latest"], "id":1}' ```