master
sre 4 years ago
parent 86af93152c
commit 1448510a62

@ -6,7 +6,7 @@ import (
"net/http" "net/http"
) )
func GET(url string) ([]byte, error) { func (hq *HTTPQuery) GET(url string) ([]byte, error) {
method := "GET" method := "GET"
client := &http.Client{} client := &http.Client{}

@ -3,7 +3,7 @@ package httpQuery
import "testing" import "testing"
func TestGet(t *testing.T) { func TestGet(t *testing.T) {
body, err := GET("https://api.ethermine.org/poolStats") body, err := httpQuery.GET("https://api.ethermine.org/poolStats")
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }

Loading…
Cancel
Save