GoBlog/httpClient.go

18 lines
258 B
Go
Raw Normal View History

2021-03-31 07:29:52 +00:00
package main
import (
"net/http"
"time"
)
type httpClient interface {
Do(req *http.Request) (*http.Response, error)
}
var appHttpClient httpClient = &http.Client{
2021-03-31 07:29:52 +00:00
Timeout: 5 * time.Minute,
Transport: &http.Transport{
DisableKeepAlives: true,
},
}