Get Nakamoto block
RPC node
Fetch a Nakamoto block by its index block hash.
curl -X GET "http://localhost:20443/v3/blocks/string"
fetch("http://localhost:20443/v3/blocks/string")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:20443/v3/blocks/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "http://localhost:20443/v3/blocks/string"
response = requests.request("GET", url)
print(response.text)
"string"
Empty