This commit is contained in:
2022-10-09 21:08:11 +08:00
parent 3f8ca3fcc4
commit 319b0b8076

View File

@@ -1,26 +0,0 @@
package gotest
import (
"fmt"
"github.com/kirinlabs/HttpRequest"
"testing"
)
type weather struct {
status string
result string
}
func Test_we(t *testing.T) {
get, err := HttpRequest.JSON().Get("https://api.caiyunapp.com/v2.6/y1BgC9gnutIzXlZF/126.62,45.62/realtime?alert=true")
if err != nil {
return
}
body, err := get.Body()
if err != nil {
return
}
s := string(body)
fmt.Println(s)
}