Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

POST requests

It is possible to interact with geth via JSONRPC over HTTP. For this purpose, the curl tool can be used.

Curl is available at https://curl.haxx.se/.

Some examples are shown here to familiarize you with the POST request and show how to make POST requests using curl.

POST is request method supported by HTTP. You can read more about POST here https://en.wikipedia.org/wiki/POST_(HTTP)

Before using the JSONRPC interface over HTTP, the geth client should be started up with appropriate switches, as shown here:

--rpcapi web3 

This switch will enable the web3 interface over HTTP.

The Linux command, curl, can be used for the purpose of communicating over HTTP, as shown here in the example.

Retrieve the list of accounts: For example, in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content