blob: a49baf81750137de228adb3bcf7e81ae2d73dedd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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) }
|