package main import ( "net/http" "time" ) var client = &http.Client{Timeout: 2 * time.Minute} func newRequest(method, endpoint, path string) (*http.Request, error) { return http.NewRequest(method, urlJoin(endpoint, path), nil) } func httpDo(req *http.Request) (*http.Response, error) { return client.Do(req) }