MCPcopy Create free account
hub / github.com/ethstorage/es-node / sendMessage

Function sendMessage

ethstorage/node/node.go:605–617  ·  view source on GitHub ↗
(url string, data string)

Source from the content-addressed store, hash-verified

603}
604
605func sendMessage(url string, data string) (string, error) {
606 contentType := "application/json"
607 resp, err := http.Post(url, contentType, strings.NewReader(data))
608 if err != nil {
609 return "", err
610 }
611 defer resp.Body.Close()
612 b, err := io.ReadAll(resp.Body)
613 if err != nil {
614 return "", err
615 }
616 return string(b), nil
617}

Callers 1

UploadNodeStateMethod · 0.70

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected