乐趣区

关于go:http20

transport := &http.Transport{TLSClientConfig:     &tls.Config{InsecureSkipVerify: true}, // 不校验服务端证书
        MaxIdleConns:        100,
        MaxIdleConnsPerHost: 10,
        IdleConnTimeout:     time.Duration(10) * time.Second, // 连贯闲暇超时
    }
    client := &http.Client{
        Transport: transport,
        Timeout:   time.Duration(5) * time.Millisecond, // 申请超时
    }
退出移动版