MCPcopy Create free account
hub / github.com/DOSNetwork/core / makeRequest

Function makeRequest

main.go:57–80  ·  view source on GitHub ↗
(f string)

Source from the content-addressed store, hash-verified

55}
56
57func makeRequest(f string) ([]byte, error) {
58
59 tServer := "http://localhost:8080/" + f
60
61 req, err := http.NewRequest("GET", tServer, nil)
62 if err != nil {
63 fmt.Println("makeRequest err ", err)
64 return nil, err
65 }
66
67 client := &http.Client{}
68 resp, err := client.Do(req)
69 if err != nil {
70 fmt.Println("makeRequest err ", err)
71 return nil, err
72 }
73 defer resp.Body.Close()
74 r, err := ioutil.ReadAll(resp.Body)
75 if err != nil {
76 fmt.Println("makeRequest err ", err)
77 return nil, err
78 }
79 return r, err
80}
81
82func getkey() (key *keystore.Key, err error) {
83 //Check if there is a keystore

Callers 7

actionShowStatusFunction · 0.85
actionGroupFormationFunction · 0.85
actionGroupDissolveFunction · 0.85
actionBootstrapFunction · 0.85
actionRnadomFunction · 0.85
actionWalletBalanceFunction · 0.85
actionEnableGuardianFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected