diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2024-04-23 22:31:03 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-05-31 16:44:47 +0100 |
commit | 3c08e11c3ea4499e8d20609e2417cac859b3e98e (patch) | |
tree | 58a5af4ca365c11be3da215578ab860419ec8a3e /doc | |
parent | 457e1846d2bf6ef9d54b9ba1a330ba8bbff13091 (diff) | |
download | bitcoin-3c08e11c3ea4499e8d20609e2417cac859b3e98e.tar.xz |
doc: JSON-RPC request Content-Type is application/json
Specify json content type in RPC examples
Diffstat (limited to 'doc')
-rw-r--r-- | doc/JSON-RPC-interface.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/JSON-RPC-interface.md b/doc/JSON-RPC-interface.md index 7640102172..2a97aa351d 100644 --- a/doc/JSON-RPC-interface.md +++ b/doc/JSON-RPC-interface.md @@ -33,10 +33,10 @@ requests when multiple wallets are in use. ```sh # Get block count from the / endpoint when rpcuser=alice and rpcport=38332 -$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' localhost:38332/ +$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: application/json;' localhost:38332/ # Get balance from the /wallet/walletname endpoint when rpcuser=alice, rpcport=38332 and rpcwallet=desc-wallet -$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: text/plain;' localhost:38332/wallet/desc-wallet +$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: application/json;' localhost:38332/wallet/desc-wallet ``` |