package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]interface{}{
"signedTransaction": "0x02f8b983088bb00e8459682f0084cf5f645482cb2694ba447498dc4c169f2b4f427b2c4d532320457e89872386f26fc10000b844f9609f08000000000000000000000000092af80778ff3c3d27fd2744c39f6e9326d9aaee0000000000000000000000000000000000000000000000000000000000000000c080a0709f764a37d31ed49fa84913082568b241b57a3cc7e660a597868f9d39bb4055a018ce04abc90fcceec21bf084c8966426ad7eda33a1cb541078b8a597ea7340a8",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api-test.p2p.org/api/v1/staking/pool/hoodi/transaction/send", bytes.NewBuffer(body))
req.Header.Set("authorization", "Bearer <token>")
req.Header.Set("content-type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}