kefu/tools/http_test.go

21 lines
511 B
Go
Raw Permalink Normal View History

2024-12-10 02:50:12 +00:00
package tools
import (
"log"
"testing"
)
func TestGetStream(t *testing.T) {
GetStream("http://81.69.45.114:8083/data_collection/searchStream?keywords=你会什么呢啊")
}
func TestPostHeader(t *testing.T) {
url := "https://jd.sopans.com/check"
headers := make(map[string]string)
headers["Content-Type"] = "application/x-www-form-urlencoded"
res, err := PostHeader(url, []byte("username=kefu2&password=1234526"), headers)
log.Println(res, err)
}
func TestIsMobile(t *testing.T) {
IsMobile("aaaa")
}