mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
20 lines
332 B
Go
20 lines
332 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/gospider007/requests"
|
|
)
|
|
|
|
func TestDefaultClient(t *testing.T) {
|
|
for i := 0; i < 2; i++ {
|
|
resp, err := requests.Get(nil, "https://httpbin.org/anything")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
if i == 1 && resp.IsNewConn() {
|
|
t.Error("new conn error")
|
|
}
|
|
}
|
|
}
|