You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gorequest/http_test.go

27 lines
559 B

2 years ago
package gorequest
import (
"testing"
)
func TestGet(t *testing.T) {
appHttp := NewHttp()
appHttp.SetDebug()
//appHttp.SetUri("https://api.dtapp.net/ip")
get, err := appHttp.Get("https://api.dtapp.net/ip")
t.Logf("get%+v\n", get)
t.Logf("get.ResponseBody%s\n", get.ResponseBody)
t.Logf("err%s\n", err)
}
func TestPost(t *testing.T) {
appHttp := NewHttp()
appHttp.SetUri("https://api.dtapp.net/ip")
get, err := appHttp.Post()
t.Logf("get%+v\n", get)
t.Logf("get.ResponseBody%s\n", get.ResponseBody)
t.Logf("err%s\n", err)
}