web3-proxy/wrk/getBlockNumber.lua

12 lines
346 B
Lua
Raw Normal View History

2022-05-05 22:07:09 +03:00
wrk.method = "POST"
wrk.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":420}"
wrk.headers["Content-Type"] = "application/json"
2023-10-21 01:33:20 +03:00
response = function(status, headers, body)
if status ~= 200 then
io.write("Status: ".. status .."\n")
io.write("Body:\n")
io.write(body .. "\n")
end
end