Go-based Ethereum new Block alert REST Interface
This REST API support Gin framework.
Handler Method Support:
- Post Block
- Get Block
- Alerting (PING)
Field:
- Height (Block number)
- Minedby (Block Miner)
$ go mod init
$ go run main.go
$ make dev
http://localhost:8080/web Web Interface
GET http://localhost:8080/blockfeed
POST http://localhost:8080/blockfeed
if you want to reproduce new field use a Unit Test
$ cd platform
$ go test
await fetch('/blockfeed', {
method: 'POST',
headers: {'content-type': 'application/json'},
body: JSON.stringify({
number: '1',
minedby: '2Miners'
})
})