diff --git a/docs/public-networks/get-started/start-node.md b/docs/public-networks/get-started/start-node.md index 9898fb253a5..8733bb4692a 100644 --- a/docs/public-networks/get-started/start-node.md +++ b/docs/public-networks/get-started/start-node.md @@ -139,13 +139,13 @@ If you started Besu with the [`--rpc-http-enabled`](../reference/cli/options.md# - `eth_chainId` returns the chain ID of the network. ```bash - curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545 + curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json" ``` - `eth_syncing` returns the starting, current, and highest block. ```bash - curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545 + curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json" ``` For example, after connecting to Mainnet, `eth_syncing` will return something similar to: diff --git a/docs/public-networks/how-to/use-besu-api/authenticate.md b/docs/public-networks/how-to/use-besu-api/authenticate.md index eba08628743..7905df38d1c 100644 --- a/docs/public-networks/how-to/use-besu-api/authenticate.md +++ b/docs/public-networks/how-to/use-besu-api/authenticate.md @@ -306,7 +306,7 @@ Specify the `Bearer` in the header. ```bash -curl -X POST -H 'Authorization: Bearer ' -d '{"jsonrpc":"2.0","method":"","params":[],"id":1}' +curl -X POST -H 'Authorization: Bearer ' -d '{"jsonrpc":"2.0","method":"","params":[],"id":1}' -H "Content-Type: application/json" ``` @@ -314,7 +314,7 @@ curl -X POST -H 'Authorization: Bearer ' -d '{"jsonrpc":"2.0","method ```bash -curl -X POST -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MTQxNiwiZXhwIjoxNTUwNDYxNzE2fQ.WQ1mqpqzRLHaoL8gOSEZPvnRs_qf6j__7A3Sg8vf9RKvWdNTww_vRJF1gjcVy-FFh96AchVnQyXVx0aNUz9O0txt8VN3jqABVWbGMfSk2T_CFdSw5aDjuriCsves9BQpP70Vhj-tseaudg-XU5hCokX0tChbAqd9fB2138zYm5M' -d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' http://localhost:8545 +curl -X POST -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MTQxNiwiZXhwIjoxNTUwNDYxNzE2fQ.WQ1mqpqzRLHaoL8gOSEZPvnRs_qf6j__7A3Sg8vf9RKvWdNTww_vRJF1gjcVy-FFh96AchVnQyXVx0aNUz9O0txt8VN3jqABVWbGMfSk2T_CFdSw5aDjuriCsves9BQpP70Vhj-tseaudg-XU5hCokX0tChbAqd9fB2138zYm5M' -d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' http://localhost:8545/ -H "Content-Type: application/json" ``` diff --git a/docs/public-networks/how-to/use-besu-api/json-rpc.md b/docs/public-networks/how-to/use-besu-api/json-rpc.md index af05d31118e..24f81cf28b7 100644 --- a/docs/public-networks/how-to/use-besu-api/json-rpc.md +++ b/docs/public-networks/how-to/use-besu-api/json-rpc.md @@ -86,7 +86,7 @@ To make RPC requests over HTTP, you can use [`curl`](https://curl.haxx.se/downlo ```bash -curl -X POST --data '{"jsonrpc":"2.0","id":,"method":"","params":[]}' +curl -X POST --data '{"jsonrpc":"2.0","id":,"method":"","params":[]}' -H "Content-Type: application/json" ``` @@ -94,7 +94,7 @@ curl -X POST --data '{"jsonrpc":"2.0","id":,"method":"" ```bash -curl -X POST --data '{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}' http://127.0.0.1:8555 +curl -X POST --data '{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}' http://127.0.0.1:8555/ -H "Content-Type: application/json" ``` @@ -120,7 +120,7 @@ You can use `curl` to make multiple RPC requests (batch requests) over HTTP at t ```bash -curl -X POST --data '[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]' http://127.0.0.1:8555 +curl -X POST --data '[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]' http://127.0.0.1:8555/ -H "Content-Type: application/json" ```